17 lines
232 B
Go
17 lines
232 B
Go
package settings
|
|
|
|
import "flag"
|
|
|
|
// as per https://stackoverflow.com/a/54747682.
|
|
func isFlagPassed(name string) bool {
|
|
found := false
|
|
|
|
flag.Visit(func(f *flag.Flag) {
|
|
if f.Name == name {
|
|
found = true
|
|
}
|
|
})
|
|
|
|
return found
|
|
}
|