mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 22:05:59 +00:00
fix code style
Signed-off-by: lixd <xueduan.li@gmail.com>
This commit is contained in:
parent
26a395ecc2
commit
41584bde23
@ -81,12 +81,6 @@ type FakeVersion struct {
|
||||
Version string
|
||||
}
|
||||
|
||||
func snapshot(imageList []kubecontainer.Image) []kubecontainer.Image {
|
||||
result := make([]kubecontainer.Image, len(imageList))
|
||||
copy(result, imageList)
|
||||
return result
|
||||
}
|
||||
|
||||
func (fv *FakeVersion) String() string {
|
||||
return fv.Version
|
||||
}
|
||||
@ -371,6 +365,12 @@ func (f *FakeRuntime) ListImages(_ context.Context) ([]kubecontainer.Image, erro
|
||||
return snapshot(f.ImageList), f.Err
|
||||
}
|
||||
|
||||
func snapshot(imageList []kubecontainer.Image) []kubecontainer.Image {
|
||||
result := make([]kubecontainer.Image, len(imageList))
|
||||
copy(result, imageList)
|
||||
return result
|
||||
}
|
||||
|
||||
func (f *FakeRuntime) RemoveImage(_ context.Context, image kubecontainer.ImageSpec) error {
|
||||
f.Lock()
|
||||
defer f.Unlock()
|
||||
|
Loading…
Reference in New Issue
Block a user