You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flagSet.BoolVar(&flags.printProtocol, flagProtocol, false, "Print the protocol to stdout and exit.")
45
-
flagSet.BoolVar(&flags.printSpec, flagSpec, false, "Print the spec to stdout in the specified format and exit.")
46
-
flagSet.StringVar(&formatString, flagFormat, formatBinaryString, fmt.Sprintf("The format to use for requests, responses, and specs. Must be one of [%q, %q].", formatBinaryString, formatJSONString))
48
+
flagSet.BoolVar(&flags.printProtocol, ProtocolFlagName, false, "Print the protocol to stdout and exit.")
49
+
flagSet.BoolVar(&flags.printSpec, SpecFlagName, false, "Print the spec to stdout in the specified format and exit.")
50
+
flagSet.StringVar(&formatString, FormatFlagName, formatBinaryString, fmt.Sprintf("The format to use for requests, responses, and specs. Must be one of [%q, %q].", formatBinaryString, formatJSONString))
47
51
iferr:=flagSet.Parse(args); err!=nil {
48
52
returnnil, nil, err
49
53
}
50
54
ifflags.printProtocol&&flags.printSpec {
51
-
returnnil, nil, fmt.Errorf("cannot specify both --%s and --%s", flagProtocol, flagSpec)
55
+
returnnil, nil, fmt.Errorf("cannot specify both --%s and --%s", ProtocolFlagName, SpecFlagName)
52
56
}
53
57
format:=FormatBinary
54
58
ifformatString!="" {
55
59
format=FormatForString(formatString)
56
60
ifformat==0 {
57
-
returnnil, nil, fmt.Errorf("invalid value for --%s: %q", flagFormat, formatString)
61
+
returnnil, nil, fmt.Errorf("invalid value for --%s: %q", FormatFlagName, formatString)
0 commit comments