fix code style

Signed-off-by: lixd <xueduan.li@gmail.com>
This commit is contained in:
lixd 2023-09-20 09:08:30 +08:00
parent 26a395ecc2
commit 41584bde23

View File

@ -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()