Skip to content

Commit

Permalink
Update bitwardensecrets.go
Browse files Browse the repository at this point in the history
helper function
  • Loading branch information
zhaque44 authored Sep 6, 2024
1 parent bb7b813 commit fd5e146
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/providers/bitwardensecrets/bitwardensecrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ type provider struct {
ProjectID string
}

func getConfigOrEnv(cfg api.StaticConfig, key string, envVar string, defaultValue string) string {

Check failure on line 28 in pkg/providers/bitwardensecrets/bitwardensecrets.go

View workflow job for this annotation

GitHub Actions / Lint

func `getConfigOrEnv` is unused (unused)
value := cfg.String(key)
if value == "" {
value = os.Getenv(envVar)
}
if value == "" {
value = defaultValue
}
return value
}

func New(l *log.Logger, cfg api.StaticConfig) *provider {
p := &provider{
log: l,
Expand Down

0 comments on commit fd5e146

Please sign in to comment.