Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
YolandaDu1997 committed Jun 26, 2020
1 parent 4671c41 commit ca6d7ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions generators/cmd/cli/cmd/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ var showCmd = &cobra.Command{
cmd.Help()
return nil
}
err := writer.WriteToDisk(filename, os.Stdout)
if err != nil {

if err := writer.WriteToDisk(filename, os.Stdout); err != nil {
return err
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion generators/pkg/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func Parse(r io.Reader) (generator.GitHubSpec, error) {
return generator.GitHubSpec{}, fmt.Errorf("fail to read from the input: %w", err)
}
res := generator.GitHubSpec{}
if err = yaml.Unmarshal(spec, &res); err != nil {
if err := yaml.Unmarshal(spec, &res); err != nil {
return res, fmt.Errorf("fail to unmarshal from the input: %w", err)
}

Expand Down

0 comments on commit ca6d7ae

Please sign in to comment.