diff --git a/_examples/027-global-option/main.go b/_examples/027-global-option/main.go index d185124..6690d7c 100644 --- a/_examples/027-global-option/main.go +++ b/_examples/027-global-option/main.go @@ -16,7 +16,7 @@ func main() { // root command type rootT struct { cli.Helper - Self *rootT `json:"-" cli:"c,config" usage:"config" parser:"jsonfile" dft:"1.json"` + Self *rootT `json:"-" cli:"c,config" usage:"config" parser:"jsonfile" dft:"$__EXEC_FILENAME.json"` Host string `cli:"H,host" usage:"host addr" dft:"$HOST"` Port int `cli:"p,port" usage:"listening port"` } diff --git a/_examples/027-global-option/run.sh b/_examples/027-global-option/run.sh index 4c3d27b..3c9aa65 100755 --- a/_examples/027-global-option/run.sh +++ b/_examples/027-global-option/run.sh @@ -4,7 +4,7 @@ set -e go build -o app -cat >1.json<app.json<