lib/config: Raw() -> RawCopy()

This commit is contained in:
Audrius Butkevicius
2016-11-12 09:34:18 +00:00
committed by Jakob Borg
parent a1a91d5ef4
commit f60b424d70
10 changed files with 26 additions and 24 deletions

View File

@@ -120,9 +120,11 @@ func (w *Wrapper) Unsubscribe(c Committer) {
w.mut.Unlock()
}
// Raw returns the currently wrapped Configuration object.
func (w *Wrapper) Raw() Configuration {
return w.cfg
// RawCopy returns a copy of the currently wrapped Configuration object.
func (w *Wrapper) RawCopy() Configuration {
w.mut.Lock()
defer w.mut.Unlock()
return w.cfg.Copy()
}
// Replace swaps the current configuration object for the given one.