diff --git a/change.go b/change.go index 18c63d98f08831814a34d3262ed4c6995f9f0d65..670c4b41e43745f87670877ce17f7dcaf3471053 100644 --- a/change.go +++ b/change.go @@ -74,3 +74,8 @@ func (s *Settings[C]) setConfigInternal(config C, lock bool) *Settings[C] { func (s *Settings[C]) SetConfig(config C) *Settings[C] { return s.setConfigInternal(config, true) } + +// Copy implements the xflags.Copyable interface. +func (s *Settings[C]) Copy(config C) { + s.setConfigInternal(config, true) +} diff --git a/settings.go b/settings.go index 118d9db498969893a338d91d7fa1341f2e1fc25c..ff3506767fcf76e6bf879c14dcfc2278417f3756 100644 --- a/settings.go +++ b/settings.go @@ -18,6 +18,7 @@ type fileWatch struct { onWatch bool } +// Settings is the main struct for the configuration type Settings[C any] struct { files fileBackend stream streamBackend