fix: replace Parse with ParseArgs

Parse() is deprecated
This commit is contained in:
Zhizhen He 2021-11-17 10:18:42 +08:00 committed by Christopher Allen Lane
parent fe8f39013e
commit c482488c41

View File

@ -21,7 +21,7 @@ const version = "4.2.4"
func main() { func main() {
// initialize options // initialize options
opts, err := docopt.Parse(usage(), nil, true, version, false) opts, err := docopt.ParseArgs(usage(), nil, version)
if err != nil { if err != nil {
// panic here, because this should never happen // panic here, because this should never happen
panic(fmt.Errorf("docopt failed to parse: %v", err)) panic(fmt.Errorf("docopt failed to parse: %v", err))