A few tweaks based on feedback in #361

main
Dan Buch 8 years ago
parent 4cae17cfe1
commit 06c01a4bba
No known key found for this signature in database
GPG Key ID: FAEF12936DD3E3EC

@ -14,11 +14,13 @@ import (
var (
appActionDeprecationURL = "https://github.com/codegangsta/cli/blob/master/CHANGELOG.md#deprecated-cli-app-action-signature"
contactSysadmin = "This is an error in the application. Please contact the distributor of this application if this is not you."
errNonFuncAction = NewExitError("ERROR invalid Action type. "+
"Must be a func of type `cli.ActionFunc`. "+
fmt.Sprintf("Must be a func of type `cli.ActionFunc`. %s", contactSysadmin)+
fmt.Sprintf("See %s", appActionDeprecationURL), 2)
errInvalidActionSignature = NewExitError("ERROR invalid Action signature. "+
"Must be `cli.ActionFunc`. "+
fmt.Sprintf("Must be `cli.ActionFunc`. %s", contactSysadmin)+
fmt.Sprintf("See %s", appActionDeprecationURL), 2)
)
@ -419,7 +421,7 @@ func HandleAction(action interface{}, context *Context) (err error) {
if len(vals) == 0 {
fmt.Fprintln(os.Stderr,
"DEPRECATED Action signature. Must be `cli.ActionFunc`")
return err
return nil
}
if len(vals) > 1 {

Loading…
Cancel
Save