mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +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 {
|
if err == errors.CheckpointNotFoundError {
|
||||||
glog.Warningf("Failed to retrieve checkpoint for sandbox %q: %v", podSandboxID, err)
|
glog.Warningf("Failed to retrieve checkpoint for sandbox %q: %v", podSandboxID, err)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
} else {
|
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
portMappings := make([]*hostport.PortMapping, 0, len(checkpoint.Data.PortMappings))
|
portMappings := make([]*hostport.PortMapping, 0, len(checkpoint.Data.PortMappings))
|
||||||
|
@@ -372,9 +372,8 @@ func (f *FakeDockerClient) popError(op string) error {
|
|||||||
if ok {
|
if ok {
|
||||||
delete(f.Errors, op)
|
delete(f.Errors, op)
|
||||||
return err
|
return err
|
||||||
} else {
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListContainers is a test-spy implementation of Interface.ListContainers.
|
// ListContainers is a test-spy implementation of Interface.ListContainers.
|
||||||
|
@@ -32,7 +32,7 @@ type instrumentedInterface struct {
|
|||||||
client Interface
|
client Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates an instrumented Interface from an existing Interface.
|
// NewInstrumentedInterface creates an instrumented Interface from an existing Interface.
|
||||||
func NewInstrumentedInterface(dockerClient Interface) Interface {
|
func NewInstrumentedInterface(dockerClient Interface) Interface {
|
||||||
return instrumentedInterface{
|
return instrumentedInterface{
|
||||||
client: dockerClient,
|
client: dockerClient,
|
||||||
|
Reference in New Issue
Block a user