Fix lint issues
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
37f118d73a
commit
d69ad9b5a3
9 changed files with 24 additions and 27 deletions
|
@ -110,7 +110,9 @@ func main() {
|
|||
logrus.Errorf("error opening storage: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer store.Shutdown(false)
|
||||
defer func() {
|
||||
_, _ = store.Shutdown(false)
|
||||
}()
|
||||
|
||||
storage.Transport.SetStore(store)
|
||||
ref, err = storage.Transport.ParseStoreReference(store, imageName)
|
||||
|
@ -133,7 +135,9 @@ func main() {
|
|||
logrus.Errorf("error loading signature policy: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer policyContext.Destroy()
|
||||
defer func() {
|
||||
_ = policyContext.Destroy()
|
||||
}()
|
||||
options := ©.Options{}
|
||||
|
||||
if importFrom != "" {
|
||||
|
@ -161,9 +165,9 @@ func main() {
|
|||
}
|
||||
}
|
||||
if addName != "" {
|
||||
destImage, err := storage.Transport.GetStoreImage(store, ref)
|
||||
if err != nil {
|
||||
logrus.Errorf("error finding image: %v", err)
|
||||
destImage, err1 := storage.Transport.GetStoreImage(store, ref)
|
||||
if err1 != nil {
|
||||
logrus.Errorf("error finding image: %v", err1)
|
||||
os.Exit(1)
|
||||
}
|
||||
names := append(destImage.Names, imageName, addName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue