Parse behaviour is wrong when flag contains "-"
ty2 opened this issue · 1 comments
ty2 commented
ENV
export NODASH=1
export HAVE_DASH=2
Config file
nodash=10
havedash=20
var noDash string
var haveDash string
flag.StringVar(&noDash, "nodash", "0", "noDash")
flag.StringVar(&haveDash, "have-dash", "0", "haveDash")
flag.Parse()
fmt.Println(nodash, haveDash) // "10" "2", expected result should be "10" "20"
ty2 commented
mistake, sorry