Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dvob committed Nov 28, 2021
1 parent e86e67a commit 6281872
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/cloudinit/iso.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ func (c *Config) ISO() ([]byte, error) {
if err != nil {
return nil, err
}
defer iw.Cleanup()
defer func() {
_ = iw.Cleanup()
}()
if c.MetaData != nil {
err = marshalToIso(iw, metaFileName, c.MetaData)
if err != nil {
Expand All @@ -32,8 +34,8 @@ func (c *Config) ISO() ([]byte, error) {
return nil, err
}
isoImage := &bytes.Buffer{}
iw.WriteTo(isoImage, "cidata")
return isoImage.Bytes(), nil
err = iw.WriteTo(isoImage, "cidata")
return isoImage.Bytes(), err
}

func marshalToIso(iw *iso9660.ImageWriter, file string, m Marshaler) error {
Expand Down

0 comments on commit 6281872

Please sign in to comment.