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
10de5b12
Commit
10de5b12
authored
Jul 12, 2014
by
Claire Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkg/kubelet: explicitly return nil as error and nil as a result on error
parent
89655584
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
kubelet.go
pkg/kubelet/kubelet.go
+2
-2
No files found.
pkg/kubelet/kubelet.go
View file @
10de5b12
...
@@ -192,7 +192,7 @@ func (kl *Kubelet) getDockerContainers() (map[DockerID]docker.APIContainers, err
...
@@ -192,7 +192,7 @@ func (kl *Kubelet) getDockerContainers() (map[DockerID]docker.APIContainers, err
result
:=
map
[
DockerID
]
docker
.
APIContainers
{}
result
:=
map
[
DockerID
]
docker
.
APIContainers
{}
containerList
,
err
:=
kl
.
DockerClient
.
ListContainers
(
docker
.
ListContainersOptions
{})
containerList
,
err
:=
kl
.
DockerClient
.
ListContainers
(
docker
.
ListContainersOptions
{})
if
err
!=
nil
{
if
err
!=
nil
{
return
result
,
err
return
nil
,
err
}
}
for
_
,
value
:=
range
containerList
{
for
_
,
value
:=
range
containerList
{
// Skip containers that we didn't create to allow users to manually
// Skip containers that we didn't create to allow users to manually
...
@@ -202,7 +202,7 @@ func (kl *Kubelet) getDockerContainers() (map[DockerID]docker.APIContainers, err
...
@@ -202,7 +202,7 @@ func (kl *Kubelet) getDockerContainers() (map[DockerID]docker.APIContainers, err
}
}
result
[
DockerID
(
value
.
ID
)]
=
value
result
[
DockerID
(
value
.
ID
)]
=
value
}
}
return
result
,
err
return
result
,
nil
}
}
// Return Docker's container ID for a manifest's container. Returns an empty string if it doesn't exist.
// Return Docker's container ID for a manifest's container. Returns an empty string if it doesn't exist.
...
...
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