Skip to content

Commit d284a0d

Browse files
chore: prefixs to prefixes
1 parent 6db5a1d commit d284a0d

22 files changed

+44
-44
lines changed

internal/onexctl/util/options/server_options.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ func (o *ServerOptions) Validate() []error {
3636
}
3737

3838
// 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, ""+
4141
"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 "+
4545
"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.")
4848
}
4949

50-
func join(prefixs ...string) string {
51-
joined := strings.Join(prefixs, ".")
50+
func join(prefixes ...string) string {
51+
joined := strings.Join(prefixes, ".")
5252
if joined != "" {
5353
joined += "."
5454
}

internal/pkg/client/usercenter/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (o *UserCenterOptions) Validate() []error {
4343
}
4444

4545
// AddFlags adds flags for a specific APIServer to the specified FlagSet.
46-
func (o *UserCenterOptions) AddFlags(fs *pflag.FlagSet, prefixs ...string) {
46+
func (o *UserCenterOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) {
4747
if o == nil {
4848
return
4949
}

pkg/options/authentication_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (o *ClientCertAuthenticationOptions) Validate() []error {
3333

3434
// AddFlags adds flags related to ClientCertAuthenticationOptions for a specific server to the
3535
// specified FlagSet.
36-
func (o *ClientCertAuthenticationOptions) AddFlags(fs *pflag.FlagSet, prefixs ...string) {
36+
func (o *ClientCertAuthenticationOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) {
3737
fs.StringVar(&o.ClientCA, "client-ca-file", o.ClientCA, ""+
3838
"If set, any request presenting a client certificate signed by one of "+
3939
"the authorities in the client-ca-file is authenticated with an identity "+

pkg/options/consul_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func (o *ConsulOptions) Validate() []error {
3737
}
3838

3939
// AddFlags adds flags related to mysql storage for a specific APIServer to the specified FlagSet.
40-
func (o *ConsulOptions) AddFlags(fs *pflag.FlagSet, prefixs ...string) {
40+
func (o *ConsulOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) {
4141
fs.StringVar(&o.Addr, "consul.addr", o.Addr, ""+
4242
"Addr is the address of the consul server.")
4343

pkg/options/etcd_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (o *EtcdOptions) Validate() []error {
5151
}
5252

5353
// AddFlags adds flags related to redis storage for a specific APIServer to the specified FlagSet.
54-
func (o *EtcdOptions) AddFlags(fs *pflag.FlagSet, prefixs ...string) {
54+
func (o *EtcdOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) {
5555
o.TLSOptions.AddFlags(fs, "etcd")
5656

5757
fs.StringSliceVar(&o.Endpoints, "etcd.endpoints", o.Endpoints, "Endpoints of etcd cluster.")

pkg/options/grpc_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (o *GRPCOptions) Validate() []error {
5151

5252
// AddFlags adds flags related to features for a specific api server to the
5353
// specified FlagSet.
54-
func (o *GRPCOptions) AddFlags(fs *pflag.FlagSet, prefixs ...string) {
54+
func (o *GRPCOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) {
5555
fs.StringVar(&o.Network, "grpc.network", o.Network, "Specify the network for the gRPC server.")
5656
fs.StringVar(&o.Addr, "grpc.addr", o.Addr, "Specify the gRPC server bind address and port.")
5757
fs.DurationVar(&o.Timeout, "grpc.timeout", o.Timeout, "Timeout for server connections.")

pkg/options/health_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (o *HealthOptions) Validate() []error {
4444
}
4545

4646
// AddFlags adds flags related to redis storage for a specific APIServer to the specified FlagSet.
47-
func (o *HealthOptions) AddFlags(fs *pflag.FlagSet, prefixs ...string) {
47+
func (o *HealthOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) {
4848
fs.BoolVar(&o.HTTPProfile, "health.enable-http-profiler", o.HTTPProfile, "Expose runtime profiling data via HTTP.")
4949
fs.StringVar(&o.HealthCheckPath, "health.check-path", o.HealthCheckPath, "Specifies liveness health check request path.")
5050
fs.StringVar(&o.HealthCheckAddress, "health.check-address", o.HealthCheckAddress, "Specifies liveness health check bind address.")

pkg/options/helper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ const (
2323
TiB
2424
)
2525

26-
func join(prefixs ...string) string {
27-
joined := strings.Join(prefixs, ".")
26+
func join(prefixes ...string) string {
27+
joined := strings.Join(prefixes, ".")
2828
if joined != "" {
2929
joined += "."
3030
}

pkg/options/http_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (o *HTTPOptions) Validate() []error {
5353

5454
// AddFlags adds flags related to HTTPS server for a specific APIServer to the
5555
// specified FlagSet.
56-
func (o *HTTPOptions) AddFlags(fs *pflag.FlagSet, prefixs ...string) {
56+
func (o *HTTPOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) {
5757
fs.StringVar(&o.Network, "http.network", o.Network, "Specify the network for the HTTP server.")
5858
fs.StringVar(&o.Addr, "http.addr", o.Addr, "Specify the HTTP server bind address and port.")
5959
fs.DurationVar(&o.Timeout, "http.timeout", o.Timeout, "Timeout for server connections.")

pkg/options/insecure_serving.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ func (s *InsecureServingOptions) Validate() []error {
3636

3737
// AddFlags adds flags related to features for a specific api server to the
3838
// specified FlagSet.
39-
func (s *InsecureServingOptions) AddFlags(fs *pflag.FlagSet, prefixs ...string) {
39+
func (s *InsecureServingOptions) AddFlags(fs *pflag.FlagSet, prefixes ...string) {
4040
fs.StringVar(&s.Addr, "insecure.addr", s.Addr, "Specify the HTTP server bind address and port.")
4141
}

0 commit comments

Comments
 (0)