Skip to content

Commit

Permalink
Fix linter warnings (#454)
Browse files Browse the repository at this point in the history
* Fix linter warnings
  • Loading branch information
dopey authored Mar 14, 2024
1 parent 00d3dab commit 37fd9c1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kms/apiv1/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (o *Options) GetType() (Type, error) {

var ErrNonInteractivePasswordPrompt = errors.New("password required in non-interactive context")

var NonInteractivePasswordPrompter = func(s string) ([]byte, error) {
var NonInteractivePasswordPrompter = func(_ string) ([]byte, error) {
return nil, ErrNonInteractivePasswordPrompt
}

Expand Down
2 changes: 1 addition & 1 deletion kms/azurekms/key_vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ type defaultOptions struct {
ProtectionLevel apiv1.ProtectionLevel
}

var createCredentials = func(ctx context.Context, opts apiv1.Options) (azcore.TokenCredential, error) {
var createCredentials = func(_ context.Context, opts apiv1.Options) (azcore.TokenCredential, error) {
var tenantID string
var clientOptions policy.ClientOptions
if opts.URI != "" {
Expand Down
2 changes: 1 addition & 1 deletion kms/capi/no_capi.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

func init() {
apiv1.Register(apiv1.CAPIKMS, func(ctx context.Context, opts apiv1.Options) (apiv1.KeyManager, error) {
apiv1.Register(apiv1.CAPIKMS, func(_ context.Context, _ apiv1.Options) (apiv1.KeyManager, error) {
name := filepath.Base(os.Args[0])
return nil, errors.Errorf("unsupported kms type 'capi': %s is compiled without Microsoft CryptoAPI support", name)
})
Expand Down
2 changes: 1 addition & 1 deletion x509util/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ type asn1Params struct {
func parseFieldParameters(str string) (p asn1Params) {
var part string
var params []string
for len(str) > 0 {
for str != "" {
part, str, _ = strings.Cut(str, ",")
switch part {
// string types
Expand Down

0 comments on commit 37fd9c1

Please sign in to comment.