Skip to content

Commit

Permalink
chore: don't print stdout sync errors (zap issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Jul 22, 2019
1 parent 6acdab0 commit 0b1e427
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ require (
golang.org/x/sync v0.0.0-20190427212804-112230192c58 // indirect
golang.org/x/sys v0.0.0-20190624143730-c5567b49c5d0 // indirect
google.golang.org/appengine v1.6.1 // indirect
moul.io/graphman v1.0.0 // indirect
moul.io/zapgorm v0.0.0-20190624143730-7f287f4f74c9
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
moul.io/graphman v1.0.0 h1:vXCIHlGMdzuZKb1gBByRj38y7e7PO2rfc/DDK4zYnzA=
moul.io/graphman v1.0.0/go.mod h1:7OpdQsfE4ibHqHP+Ir1VAUd4p5j25n4xU9bhJvQ+F0g=
moul.io/zapgorm v0.0.0-20181003053625-c808c1c4adc6 h1:Ljm5aWTlBca3uc62R9myafsLzwakKumgU/6B6fFWTsA=
moul.io/zapgorm v0.0.0-20181003053625-c808c1c4adc6/go.mod h1:5XkuYCrMvJcscMD3+T4QGDaWsCZiql8k2Pv5iNhTB/g=
moul.io/zapgorm v0.0.0-20181220094309-2149c5ded6fc h1:Ddo1Fa0ruGmrNMWVOzEfbMcp3yy3XrspnmQMJ4o7mfg=
Expand Down
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import (

func main() {
defer func() {
if err := zap.L().Sync(); err != nil {
panic(err)
}
_ = zap.L().Sync()
}()
rootCmd := cli.NewRootCommand()
if err := rootCmd.Execute(); err != nil {
Expand Down

0 comments on commit 0b1e427

Please sign in to comment.