Skip to content

Commit

Permalink
Fix null pointer reference (epic)
Browse files Browse the repository at this point in the history
  • Loading branch information
slarwise committed Aug 9, 2024
1 parent 333252c commit 26c73c4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func main() {
}
fmt.Println(string(output))
case "interactive":
cachedSecrets = make(map[string]Secret)
slog.SetLogLoggerLevel(slog.LevelError)
screen, err := tcell.NewScreen()
if err != nil {
Expand Down Expand Up @@ -273,7 +272,7 @@ type Secret struct {
} `json:"data"`
}

var cachedSecrets map[string]Secret
var cachedSecrets = make(map[string]Secret)

func (v VaultClient) getSecret(name string) (Secret, error) {
if secret, found := cachedSecrets[name]; found {
Expand Down

0 comments on commit 26c73c4

Please sign in to comment.