1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

daemon/images: fix some linting issues

- fix GoDoc
- rename a variable that collided with an import

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-07-18 14:46:02 +02:00
parent b94f7157ca
commit b529fe0995
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -24,10 +24,11 @@ import (
)
type containerStore interface {
// used by image delete
// First is used by image delete
First(container.StoreFilter) *container.Container
// used by image prune, and image list
// List is used by image prune, and image list
List() []*container.Container
// Get is used by CommitBuildStep
// TODO: remove, only used for CommitBuildStep
Get(string) *container.Container
}
@ -144,7 +145,7 @@ func (i *ImageService) CreateLayer(container *container.Container, initFunc laye
}
// GetLayerByID returns a layer by ID
// called from daemon.go Daemon.restore(), and Daemon.containerExport()
// called from daemon.go Daemon.restore(), and Daemon.containerExport().
func (i *ImageService) GetLayerByID(cid string) (layer.RWLayer, error) {
return i.layerStore.GetRWLayer(cid)
}
@ -182,8 +183,8 @@ func (i *ImageService) GraphDriverName() string {
// ReleaseLayer releases a layer allowing it to be removed
// called from delete.go Daemon.cleanupContainer(), and Daemon.containerExport()
func (i *ImageService) ReleaseLayer(rwlayer layer.RWLayer) error {
metadata, err := i.layerStore.ReleaseRWLayer(rwlayer)
layer.LogReleaseMetadata(metadata)
metaData, err := i.layerStore.ReleaseRWLayer(rwlayer)
layer.LogReleaseMetadata(metaData)
if err != nil && !errors.Is(err, layer.ErrMountDoesNotExist) && !errors.Is(err, os.ErrNotExist) {
return errors.Wrapf(err, "driver %q failed to remove root filesystem",
i.layerStore.DriverName())