File tree 2 files changed +7
-11
lines changed
2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ func parseConfig(conf []byte) (Config, error) {
147
147
}
148
148
149
149
// If we don't have config specific retry values but we do have the generic MaxRetries.
150
- // This is part backwards compatibility but also ease of configuration
150
+ // This is for backwards compatibility but also ease of configuration.
151
151
if config .MaxRetries > 0 {
152
152
if config .PipelineConfig .MaxTries == 0 {
153
153
config .PipelineConfig .MaxTries = int32 (config .MaxRetries )
Original file line number Diff line number Diff line change @@ -35,9 +35,7 @@ func init() {
35
35
}
36
36
37
37
func getAzureStorageCredentials (conf Config ) (blob.Credential , error ) {
38
-
39
38
if conf .MSIResource != "" {
40
-
41
39
msiConfig := auth .NewMSIConfig ()
42
40
msiConfig .Resource = conf .MSIResource
43
41
@@ -46,23 +44,21 @@ func getAzureStorageCredentials(conf Config) (blob.Credential, error) {
46
44
return nil , err
47
45
}
48
46
49
- // Get a new token
47
+ // Get a new token.
50
48
err = azureServicePrincipalToken .Refresh ()
51
49
if err != nil {
52
50
return nil , err
53
51
}
54
52
token := azureServicePrincipalToken .Token ()
55
53
56
54
return blob .NewTokenCredential (token .AccessToken , nil ), nil
57
-
58
- } else {
59
- credential , err := blob .NewSharedKeyCredential (conf .StorageAccountName , conf .StorageAccountKey )
60
- if err != nil {
61
- return nil , err
62
- }
63
- return credential , nil
64
55
}
65
56
57
+ credential , err := blob .NewSharedKeyCredential (conf .StorageAccountName , conf .StorageAccountKey )
58
+ if err != nil {
59
+ return nil , err
60
+ }
61
+ return credential , nil
66
62
}
67
63
68
64
func getContainerURL (ctx context.Context , conf Config ) (blob.ContainerURL , error ) {
You can’t perform that action at this time.
0 commit comments