correcting hooks calling
All checks were successful
lint / lint (pull_request) Successful in 1m2s
test / test (pull_request) Successful in 2m18s

This commit is contained in:
2024-12-17 15:35:04 +03:00
parent 19b04fe070
commit 58eec62419
8 changed files with 45 additions and 7 deletions

View File

@@ -37,7 +37,7 @@ func (c *defaultConfig) Init(opts ...Option) error {
c.funcLoad = c.fnLoad
c.funcSave = c.fnSave
c.opts.Hooks.EachNext(func(hook options.Hook) {
c.opts.Hooks.EachPrev(func(hook options.Hook) {
switch h := hook.(type) {
case HookLoad:
c.funcLoad = h(c.funcLoad)