fixup conditions
Some checks failed
build / test (push) Has been cancelled
build / lint (push) Has been cancelled
codeql / analyze (go) (push) Has been cancelled

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-01-15 08:37:00 +03:00
parent 68177c9962
commit efeb5277aa
3 changed files with 55 additions and 11 deletions

View File

@@ -136,6 +136,10 @@ func (c *vaultConfig) setToken() error {
}
func (c *vaultConfig) Load(ctx context.Context, opts ...config.LoadOption) error {
if c.opts.SkipLoad != nil && c.opts.SkipLoad(ctx, c) {
return nil
}
if err := config.DefaultBeforeLoad(ctx, c); err != nil {
return err
}
@@ -219,6 +223,10 @@ func (c *vaultConfig) Load(ctx context.Context, opts ...config.LoadOption) error
}
func (c *vaultConfig) Save(ctx context.Context, opts ...config.SaveOption) error {
if c.opts.SkipSave != nil && c.opts.SkipSave(ctx, c) {
return nil
}
if err := config.DefaultBeforeSave(ctx, c); err != nil {
return err
}