Merge pull request #53297 from x1957/code_format

Automatic merge from submit-queue (batch tested with PRs 53297, 53328). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

format some code in dockershim

**What this PR does / why we need it**:
format some code in dockershim

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
This commit is contained in:
Kubernetes Submit Queue 2017-10-10 11:20:34 -07:00 committed by GitHub
commit b543f67fc8
3 changed files with 3 additions and 5 deletions

View File

@ -325,9 +325,8 @@ func (ds *dockerService) GetPodPortMappings(podSandboxID string) ([]*hostport.Po
if err == errors.CheckpointNotFoundError {
glog.Warningf("Failed to retrieve checkpoint for sandbox %q: %v", podSandboxID, err)
return nil, nil
} else {
return nil, err
}
return nil, err
}
portMappings := make([]*hostport.PortMapping, 0, len(checkpoint.Data.PortMappings))

View File

@ -372,9 +372,8 @@ func (f *FakeDockerClient) popError(op string) error {
if ok {
delete(f.Errors, op)
return err
} else {
return nil
}
return nil
}
// ListContainers is a test-spy implementation of Interface.ListContainers.

View File

@ -32,7 +32,7 @@ type instrumentedInterface struct {
client Interface
}
// Creates an instrumented Interface from an existing Interface.
// NewInstrumentedInterface creates an instrumented Interface from an existing Interface.
func NewInstrumentedInterface(dockerClient Interface) Interface {
return instrumentedInterface{
client: dockerClient,