Skip to content

Commit

Permalink
tweak: prettier code
Browse files Browse the repository at this point in the history
  • Loading branch information
Bin-Huang committed Aug 9, 2022
1 parent 2e7460d commit 02fc344
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ func makeConstructor() error {
return err
}
// skip if generated recently
genFilename := "./constructor_gen.go"
genFilename, err := filepath.Abs("./constructor_gen.go")
if err != nil {
return err
}
if isGeneratedRecently(genFilename) {
return nil
}
Expand Down Expand Up @@ -57,11 +60,7 @@ func makeConstructor() error {
if err != nil {
return err
}
genFilepath, err := filepath.Abs(genFilename)
if err != nil {
return err
}
fmt.Printf("make-constructor: [INFO] wrote %v\n", genFilepath)
fmt.Printf("make-constructor: [INFO] wrote %v\n", genFilename)
return nil
}

Expand Down

0 comments on commit 02fc344

Please sign in to comment.