@@ -296,7 +296,7 @@ func acquireAzureArc(ctx context.Context, client Client, resource string) (base.
296296 return base.AuthResult {}, fmt .Errorf ("expected a 401 response, received %d" , response .StatusCode )
297297 }
298298
299- secret , err := client .getAzureArcSecretKey (response , resource , runtime .GOOS )
299+ secret , err := client .getAzureArcSecretKey (response , runtime .GOOS )
300300 if err != nil {
301301 return base.AuthResult {}, err
302302 }
@@ -446,9 +446,10 @@ func createAzureArcAuthRequest(ctx context.Context, resource string, key string)
446446 }
447447 req .Header .Set (metaHTTPHeaderName , "true" )
448448
449- if condition := key != "" ; condition {
449+ if key != "" {
450450 req .Header .Set ("Authorization" , fmt .Sprintf ("Basic %s" , key ))
451451 }
452+
452453 return req , nil
453454}
454455
@@ -468,7 +469,7 @@ func isAzureArcEnvironment(identityEndpoint, imdsEndpoint string, platform strin
468469 return false
469470}
470471
471- func (c * Client ) getAzureArcSecretKey (response * http.Response , resource string , platform string ) (string , error ) {
472+ func (c * Client ) getAzureArcSecretKey (response * http.Response , platform string ) (string , error ) {
472473 wwwAuthenticateHeader := response .Header .Get (wwwAuthenticateHeaderName )
473474
474475 if len (wwwAuthenticateHeader ) == 0 {
0 commit comments