Skip to content

Commit

Permalink
patch: updated some err checking to pass linting
Browse files Browse the repository at this point in the history
  • Loading branch information
drew-viles committed Nov 24, 2022
1 parent 9cc8fe5 commit 13abd03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ To use baskio to build an image, an Openstack cluster is required.`,
log.Fatalln(err)
}

build.SaveImageIDToFile(imgID)
err = build.SaveImageIDToFile(imgID)
if err != nil {
log.Fatalln(err)
}
Expand Down
5 changes: 4 additions & 1 deletion cmd/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ func SaveImageIDToFile(imgID string) error {
return err
}
defer f.Close()
f.Write([]byte(imgID))
_, err = f.Write([]byte(imgID))
if err != nil {
return err
}

return nil
}

0 comments on commit 13abd03

Please sign in to comment.