Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
d593c836
Commit
d593c836
authored
Jul 03, 2023
by
Manuel Buil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove file_windows.go
Signed-off-by:
Manuel Buil
<
mbuil@suse.com
>
parent
0809187c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
42 deletions
+0
-42
file.go
pkg/util/file.go
+0
-2
file_windows.go
pkg/util/file_windows.go
+0
-40
No files found.
pkg/util/file.go
View file @
d593c836
//go:build !windows
package
util
package
util
import
(
import
(
...
...
pkg/util/file_windows.go
deleted
100644 → 0
View file @
0809187c
package
util
import
(
"os"
"strings"
"time"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
func
SetFileModeForPath
(
name
string
,
mode
os
.
FileMode
)
error
{
return
nil
}
func
SetFileModeForFile
(
file
*
os
.
File
,
mode
os
.
FileMode
)
error
{
return
nil
}
// ReadFile reads from a file
func
ReadFile
(
path
string
)
(
string
,
error
)
{
if
path
==
""
{
return
""
,
nil
}
for
start
:=
time
.
Now
();
time
.
Since
(
start
)
<
4
*
time
.
Minute
;
{
vpnBytes
,
err
:=
os
.
ReadFile
(
path
)
if
err
==
nil
{
return
strings
.
TrimSpace
(
string
(
vpnBytes
)),
nil
}
else
if
os
.
IsNotExist
(
err
)
{
logrus
.
Infof
(
"Waiting for %s to be available
\n
"
,
path
)
time
.
Sleep
(
2
*
time
.
Second
)
}
else
{
return
""
,
err
}
}
return
""
,
errors
.
New
(
"Timeout while trying to read the file"
)
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment