Skip to content

Commit

Permalink
return write file error (#1380)
Browse files Browse the repository at this point in the history
  • Loading branch information
catalinaperalta authored Feb 8, 2021
1 parent 8d2c30d commit 861f1cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/go/cmd/api_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ func CreateAPIView(pkgDir, outputDir string) error {
}
filename := fmt.Sprintf("%s%s.json", outputDir, pkg.p.Name)
file, _ := json.MarshalIndent(review, "", " ")
_ = ioutil.WriteFile(filename, file, 0644)
err = ioutil.WriteFile(filename, file, 0644)
if err != nil {
return err
}
return nil
}

Expand Down

0 comments on commit 861f1cb

Please sign in to comment.