mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
format some code in dockershim
This commit is contained in:
@@ -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))
|
||||
|
@@ -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.
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user