Skip to content

Commit 6b1bd6e

Browse files
committed
update path handling
1 parent 6972cdb commit 6b1bd6e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

vault.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,9 @@ func WithLocalPath(path string) Option {
7878
//nolint:exhaustive
7979
switch c.Type {
8080
case ProviderTypeAge:
81-
if c.Age == nil {
82-
c.Age = &AgeConfig{}
83-
}
84-
c.Age.StoragePath = path
81+
WithAgePath(path)(c)
8582
case ProviderTypeAES256:
86-
if c.Aes == nil {
87-
c.Aes = &AesConfig{}
88-
}
89-
c.Aes.StoragePath = path
83+
WithAESPath(path)(c)
9084
}
9185
}
9286
}

0 commit comments

Comments
 (0)