fix: WithServiceLock enables, New() applies after all opts — v0.3.3 parity
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
d1579f678f
commit
05d0a64b08
1 changed files with 3 additions and 1 deletions
|
|
@ -115,6 +115,9 @@ func New(opts ...CoreOption) Result {
|
|||
}
|
||||
}
|
||||
|
||||
// Apply service lock after all opts — v0.3.3 parity
|
||||
c.LockApply()
|
||||
|
||||
return Result{c, true}
|
||||
}
|
||||
|
||||
|
|
@ -227,7 +230,6 @@ func WithOption(key string, value any) CoreOption {
|
|||
func WithServiceLock() CoreOption {
|
||||
return func(c *Core) Result {
|
||||
c.LockEnable()
|
||||
c.LockApply()
|
||||
return Result{OK: true}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue