New to Go, and having a basic conceptual problem (I think)...
Trying to use github.com/jessevdk/go-flags and have it mostly working. --help and whatnot are working fine, flags are being passed, etc.
I need to understand if a option was set via a flag or via go-flags parser using the provided default value. It appears go-flags has an "IsSet" function, but I'm clueless how to reference it. Presume:
var opts struct {
Port int `short:"p" long:"Port" description:"IP port" default:"1111"
}
_, err := flags.Parse(&opts)
I can reference the value via "opts.Port", but how can I find out if the option was set via a flag or default? Many thanks in advance!