Skip to content

Commit 3ede508

Browse files
committed
fix staticcheck lint issues
1 parent 9128620 commit 3ede508

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gopherpolicy/pkg.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ func (v *TokenValidator) TokenFromGophercloudResult(result TokenResult) *Token {
185185
Enforcer: v.Enforcer,
186186
Context: tokenData.ToContext(),
187187
ProviderClient: &gophercloud.ProviderClient{
188-
IdentityBase: v.IdentityV3.ProviderClient.IdentityBase,
189-
IdentityEndpoint: v.IdentityV3.ProviderClient.IdentityEndpoint,
190-
HTTPClient: v.IdentityV3.ProviderClient.HTTPClient,
191-
UserAgent: v.IdentityV3.ProviderClient.UserAgent,
188+
IdentityBase: v.IdentityV3.IdentityBase,
189+
IdentityEndpoint: v.IdentityV3.IdentityEndpoint,
190+
HTTPClient: v.IdentityV3.HTTPClient,
191+
UserAgent: v.IdentityV3.UserAgent,
192192
TokenID: token.ID,
193193
EndpointLocator: func(opts gophercloud.EndpointOpts) (string, error) {
194194
return openstack.V3EndpointURL(catalog, opts)

vault/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func CreateClient() (*api.Client, error) {
7474
vaultTokenFile := homeDir + "/.vault-token"
7575
bytes, err := os.ReadFile(vaultTokenFile)
7676
if errors.Is(err, os.ErrNotExist) {
77-
return nil, errors.New("Some environment variables are missing! For pipelines makes sure VAULT_ROLE_ID and VAULT_SECRET_ID are set and for manual invocations make sure VAULT_TOKEN is set or you previously logged into vault cli. DO NOT use the variables the other way around!") //nolint:stylecheck // we want it like this
77+
return nil, errors.New("Some environment variables are missing! For pipelines makes sure VAULT_ROLE_ID and VAULT_SECRET_ID are set and for manual invocations make sure VAULT_TOKEN is set or you previously logged into vault cli. DO NOT use the variables the other way around!") //nolint:staticcheck // we want it like this
7878
} else if err != nil {
7979
return nil, fmt.Errorf("failed reading %s: %w", vaultTokenFile, err)
8080
}

0 commit comments

Comments
 (0)