Skip to content

Commit 6da9ad4

Browse files
committed
fix golangci-lint errors
1 parent 4017ad4 commit 6da9ad4

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

path_config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (b *Backend) pathConfigDelete(ctx context.Context, req *logical.Request, da
9393
}
9494

9595
if err = req.Storage.Delete(ctx, fmt.Sprintf("%s/%s", PathConfigStorage, name)); err == nil {
96-
event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "config-delete", map[string]string{
96+
_ = event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "config-delete", map[string]string{
9797
"path": fmt.Sprintf("%s/%s", PathConfigStorage, name),
9898
})
9999
b.SetClient(nil, name)
@@ -148,7 +148,7 @@ func (b *Backend) pathConfigPatch(ctx context.Context, req *logical.Request, dat
148148
defer b.lockClientMutex.Unlock()
149149
if err = saveConfig(ctx, *config, req.Storage); err == nil {
150150
lrd := config.LogicalResponseData(b.flags.ShowConfigToken)
151-
event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "config-patch", changes)
151+
_ = event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "config-patch", changes)
152152
b.SetClient(nil, name)
153153
b.Logger().Debug("Patched config", "lrd", lrd, "warnings", warnings)
154154
lResp = &logical.Response{Data: lrd, Warnings: warnings}
@@ -207,7 +207,7 @@ func (b *Backend) pathConfigWrite(ctx context.Context, req *logical.Request, dat
207207
var lResp *logical.Response
208208

209209
if err = saveConfig(ctx, *config, req.Storage); err == nil {
210-
event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "config-write", map[string]string{
210+
_ = event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "config-write", map[string]string{
211211
"path": fmt.Sprintf("%s/%s", PathConfigStorage, name),
212212
"auto_rotate_token": strconv.FormatBool(config.AutoRotateToken),
213213
"auto_rotate_before": config.AutoRotateBefore.String(),

path_config_rotate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (b *Backend) pathConfigTokenRotate(ctx context.Context, request *logical.Re
107107

108108
lResp = &logical.Response{Data: config.LogicalResponseData(b.flags.ShowConfigToken)}
109109
lResp.Data["token"] = config.Token
110-
event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "config-token-rotate", map[string]string{
110+
_ = event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "config-token-rotate", map[string]string{
111111
"path": fmt.Sprintf("%s/%s", PathConfigStorage, name),
112112
"expires_at": entryToken.ExpiresAt.Format(time.RFC3339),
113113
"created_at": entryToken.CreatedAt.Format(time.RFC3339),

path_flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (b *Backend) pathFlagsUpdate(ctx context.Context, req *logical.Request, dat
4545
eventData["show_config_token"] = strconv.FormatBool(b.flags.ShowConfigToken)
4646
}
4747

48-
event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "flags-write", eventData)
48+
_ = event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "flags-write", eventData)
4949

5050
var flagData map[string]any
5151
err = mapstructure.Decode(b.flags, &flagData)

path_role.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func (b *Backend) pathRolesDelete(ctx context.Context, req *logical.Request, dat
167167
return nil, fmt.Errorf("error deleting role: %w", err)
168168
}
169169

170-
event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "role-delete", map[string]string{
170+
_ = event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "role-delete", map[string]string{
171171
"path": "roles",
172172
"role_name": roleName,
173173
})
@@ -371,7 +371,7 @@ func (b *Backend) pathRolesWrite(ctx context.Context, req *logical.Request, data
371371
return nil, err
372372
}
373373

374-
event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "role-write", map[string]string{
374+
_ = event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "role-write", map[string]string{
375375
"path": "roles",
376376
"role_name": roleName,
377377
"config_name": role.ConfigName,

path_token_role.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ func (b *Backend) pathTokenRoleCreate(ctx context.Context, req *logical.Request,
156156
resp.Secret.TTL = token.TTL()
157157
}
158158

159-
event.Event(
159+
_ = event.Event(
160160
ctx, b.Backend, operationPrefixGitlabAccessTokens, "token-write",
161161
token.Event(map[string]string{"path": fmt.Sprintf("%s/%s", PathRoleStorage, roleName)}),
162162
)

secret_access_tokens.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (b *Backend) secretAccessTokenRevoke(ctx context.Context, req *logical.Requ
128128
}
129129
}
130130

131-
event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "token-revoke", map[string]string{
131+
_ = event.Event(ctx, b.Backend, operationPrefixGitlabAccessTokens, "token-revoke", map[string]string{
132132
"lease_id": secret.LeaseID,
133133
"path": req.Secret.InternalData["path"].(string),
134134
"name": req.Secret.InternalData["name"].(string),

0 commit comments

Comments
 (0)