Use pflags word separators to make - and _ equiv.
This commit is contained in:
@@ -16,12 +16,11 @@ limitations under the License.
|
||||
|
||||
package util
|
||||
|
||||
import (
|
||||
flag "github.com/spf13/pflag"
|
||||
)
|
||||
import "github.com/spf13/pflag"
|
||||
|
||||
// InitFlags normalizes and parses the command line flags
|
||||
func InitFlags() {
|
||||
pflag.CommandLine.SetWordSeparators([]string{"-", "_"})
|
||||
AddAllFlagsToPFlags()
|
||||
flag.Parse()
|
||||
pflag.Parse()
|
||||
}
|
||||
|
Reference in New Issue
Block a user