@@ -36,19 +36,19 @@ func (o *ServerOptions) Validate() []error {
36
36
}
37
37
38
38
// AddFlags adds flags related to mysql storage for a specific APIServer to the specified FlagSet.
39
- func (o * ServerOptions ) AddFlags (fs * pflag.FlagSet , prefixs ... string ) {
40
- fs .BoolVar (& o .Insecure , join (prefixs ... )+ "insecure-skip-tls-verify" , o .Insecure , "" +
39
+ func (o * ServerOptions ) AddFlags (fs * pflag.FlagSet , prefixes ... string ) {
40
+ fs .BoolVar (& o .Insecure , join (prefixes ... )+ "insecure-skip-tls-verify" , o .Insecure , "" +
41
41
"If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure" )
42
- fs .StringVar (& o .CAFile , join (prefixs ... )+ "certificate-authority" , o .CAFile , "Path to a cert file for the certificate authority" )
43
- fs .StringVar (& o .Addr , join (prefixs ... )+ "address" , o .Addr , "The address and port of the OneX API server" )
44
- fs .DurationVar (& o .Timeout , join (prefixs ... )+ "timeout" , o .Timeout , "The length of time to wait before giving up on a single " +
42
+ fs .StringVar (& o .CAFile , join (prefixes ... )+ "certificate-authority" , o .CAFile , "Path to a cert file for the certificate authority" )
43
+ fs .StringVar (& o .Addr , join (prefixes ... )+ "address" , o .Addr , "The address and port of the OneX API server" )
44
+ fs .DurationVar (& o .Timeout , join (prefixes ... )+ "timeout" , o .Timeout , "The length of time to wait before giving up on a single " +
45
45
"server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests." )
46
- fs .IntVar (& o .MaxRetries , join (prefixs ... )+ "max-retries" , o .MaxRetries , "Maximum number of retries." )
47
- fs .DurationVar (& o .RetryInterval , join (prefixs ... )+ "retry-interval" , o .RetryInterval , "The interval time between each attempt." )
46
+ fs .IntVar (& o .MaxRetries , join (prefixes ... )+ "max-retries" , o .MaxRetries , "Maximum number of retries." )
47
+ fs .DurationVar (& o .RetryInterval , join (prefixes ... )+ "retry-interval" , o .RetryInterval , "The interval time between each attempt." )
48
48
}
49
49
50
- func join (prefixs ... string ) string {
51
- joined := strings .Join (prefixs , "." )
50
+ func join (prefixes ... string ) string {
51
+ joined := strings .Join (prefixes , "." )
52
52
if joined != "" {
53
53
joined += "."
54
54
}
0 commit comments