@@ -72,7 +72,7 @@ var TLSVersions = map[string]TLSVersion{
7272
7373func (tv * TLSVersion ) UnmarshalYAML (unmarshal func (interface {}) error ) error {
7474 var s string
75- err := unmarshal (( * string )( & s ) )
75+ err := unmarshal (& s )
7676 if err != nil {
7777 return err
7878 }
@@ -363,7 +363,7 @@ func (c *HTTPClientConfig) Validate() error {
363363 if (c .BasicAuth != nil || c .OAuth2 != nil ) && (len (c .BearerToken ) > 0 || len (c .BearerTokenFile ) > 0 ) {
364364 return errors .New ("at most one of basic_auth, oauth2, bearer_token & bearer_token_file must be configured" )
365365 }
366- if c .BasicAuth != nil && nonZeroCount (string ( c .BasicAuth .Username ) != "" , c .BasicAuth .UsernameFile != "" , c .BasicAuth .UsernameRef != "" ) > 1 {
366+ if c .BasicAuth != nil && nonZeroCount (c .BasicAuth .Username != "" , c .BasicAuth .UsernameFile != "" , c .BasicAuth .UsernameRef != "" ) > 1 {
367367 return errors .New ("at most one of basic_auth username, username_file & username_ref must be configured" )
368368 }
369369 if c .BasicAuth != nil && nonZeroCount (string (c .BasicAuth .Password ) != "" , c .BasicAuth .PasswordFile != "" , c .BasicAuth .PasswordRef != "" ) > 1 {
@@ -1224,7 +1224,7 @@ func (c *TLSConfig) getClientCertificate(ctx context.Context, secretManager Secr
12241224 }
12251225 }
12261226
1227- keySecret , err := toSecret (secretManager , Secret ( c .Key ) , c .KeyFile , c .KeyRef )
1227+ keySecret , err := toSecret (secretManager , c .Key , c .KeyFile , c .KeyRef )
12281228 if err != nil {
12291229 return nil , fmt .Errorf ("unable to use client key: %w" , err )
12301230 }
0 commit comments