Skip to content
Snippets Groups Projects
Verified Commit d402a3c6 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

feat implement the copyable interface

parent f4135cc5
No related branches found
No related tags found
No related merge requests found
...@@ -74,3 +74,8 @@ func (s *Settings[C]) setConfigInternal(config C, lock bool) *Settings[C] { ...@@ -74,3 +74,8 @@ func (s *Settings[C]) setConfigInternal(config C, lock bool) *Settings[C] {
func (s *Settings[C]) SetConfig(config C) *Settings[C] { func (s *Settings[C]) SetConfig(config C) *Settings[C] {
return s.setConfigInternal(config, true) return s.setConfigInternal(config, true)
} }
// Copy implements the xflags.Copyable interface.
func (s *Settings[C]) Copy(config C) {
s.setConfigInternal(config, true)
}
...@@ -18,6 +18,7 @@ type fileWatch struct { ...@@ -18,6 +18,7 @@ type fileWatch struct {
onWatch bool onWatch bool
} }
// Settings is the main struct for the configuration
type Settings[C any] struct { type Settings[C any] struct {
files fileBackend files fileBackend
stream streamBackend stream streamBackend
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment