cli/manifest: fix "unused-receiver" linting
cli/manifest/store/store.go:47:7: unused-receiver: method receiver 's' is not referenced in method's body, consider removing or renaming it as _ (revive) func (s *fsStore) getFromFilename(ref reference.Reference, filename string) (types.ImageManifest, error) { ^ cli/manifest/store/store.go:168:7: unused-receiver: method receiver 'n' is not referenced in method's body, consider removing or renaming it as _ (revive) func (n *notFoundError) NotFound() {} ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
20b4ab366e
commit
c8bd0a7e51
@ -44,7 +44,7 @@ func (s *fsStore) Get(listRef reference.Reference, manifest reference.Reference)
|
|||||||
return s.getFromFilename(manifest, filename)
|
return s.getFromFilename(manifest, filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *fsStore) getFromFilename(ref reference.Reference, filename string) (types.ImageManifest, error) {
|
func (*fsStore) getFromFilename(ref reference.Reference, filename string) (types.ImageManifest, error) {
|
||||||
bytes, err := os.ReadFile(filename)
|
bytes, err := os.ReadFile(filename)
|
||||||
switch {
|
switch {
|
||||||
case os.IsNotExist(err):
|
case os.IsNotExist(err):
|
||||||
@ -165,7 +165,7 @@ func (n *notFoundError) Error() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NotFound interface
|
// NotFound interface
|
||||||
func (n *notFoundError) NotFound() {}
|
func (*notFoundError) NotFound() {}
|
||||||
|
|
||||||
// IsNotFound returns true if the error is a not found error
|
// IsNotFound returns true if the error is a not found error
|
||||||
func IsNotFound(err error) bool {
|
func IsNotFound(err error) bool {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user