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
287f703d
Commit
287f703d
authored
May 22, 2017
by
FengyunPan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Close file after os.Open()
parent
5dd56c9b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
0 deletions
+3
-0
e2e.go
test/e2e/e2e.go
+1
-0
kubectl.go
test/e2e/kubectl.go
+1
-0
node_problem_detector_linux.go
test/e2e_node/node_problem_detector_linux.go
+1
-0
No files found.
test/e2e/e2e.go
View file @
287f703d
...
...
@@ -95,6 +95,7 @@ func setupProviderConfig() error {
framework
.
Logf
(
"Couldn't open cloud provider configuration %s: %#v"
,
cloudConfig
.
ConfigFile
,
err
)
}
defer
config
.
Close
()
cloudConfig
.
Provider
,
err
=
azure
.
NewCloud
(
config
)
}
...
...
test/e2e/kubectl.go
View file @
287f703d
...
...
@@ -2013,6 +2013,7 @@ func newStreamingUpload(filePath string) (*io.PipeReader, *multipart.Writer, err
if
err
!=
nil
{
return
nil
,
nil
,
err
}
defer
file
.
Close
()
r
,
w
:=
io
.
Pipe
()
...
...
test/e2e_node/node_problem_detector_linux.go
View file @
287f703d
...
...
@@ -372,6 +372,7 @@ func injectLog(file string, timestamp time.Time, log string, num int) error {
if
err
!=
nil
{
return
err
}
defer
f
.
Close
()
for
i
:=
0
;
i
<
num
;
i
++
{
_
,
err
:=
f
.
WriteString
(
fmt
.
Sprintf
(
"%s kernel: [0.000000] %s
\n
"
,
timestamp
.
Format
(
time
.
Stamp
),
log
))
if
err
!=
nil
{
...
...
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