This commit is contained in:
Michael Samoylov 2020-08-11 15:39:51 +03:00 committed by GitHub
parent a0b86e58f8
commit 5cdf8e26ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -334,10 +334,10 @@ var tryCmd = &cobra.Command{
Use: "try", Use: "try",
Short: "Try and possibly fail at something", Short: "Try and possibly fail at something",
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
err := someFunc() if err := someFunc(); err != nil {
if err := nil {
return err return err
} }
return nil
}, },
} }
``` ```