mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 23:03:40 +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
|
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 {
|
func (fv *FakeVersion) String() string {
|
||||||
return fv.Version
|
return fv.Version
|
||||||
}
|
}
|
||||||
@ -371,6 +365,12 @@ func (f *FakeRuntime) ListImages(_ context.Context) ([]kubecontainer.Image, erro
|
|||||||
return snapshot(f.ImageList), f.Err
|
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 {
|
func (f *FakeRuntime) RemoveImage(_ context.Context, image kubecontainer.ImageSpec) error {
|
||||||
f.Lock()
|
f.Lock()
|
||||||
defer f.Unlock()
|
defer f.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user