From c9849d667ab55c23d343332a11afb3eb8ede3f2d Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Sun, 17 Jul 2016 17:16:14 +0100 Subject: Update vendor libs --- .../github.com/magiconair/properties/properties.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'vendor/github.com/magiconair/properties/properties.go') diff --git a/vendor/github.com/magiconair/properties/properties.go b/vendor/github.com/magiconair/properties/properties.go index 884ef4e..e7e0104 100644 --- a/vendor/github.com/magiconair/properties/properties.go +++ b/vendor/github.com/magiconair/properties/properties.go @@ -630,6 +630,26 @@ func (p *Properties) Delete(key string) { p.k = newKeys } +// Merge merges properties, comments and keys from other *Properties into p +func (p *Properties) Merge(other *Properties) { + for k,v := range other.m { + p.m[k] = v + } + for k,v := range other.c { + p.c[k] = v + } + + outer: + for _, otherKey := range other.k { + for _, key := range p.k { + if otherKey == key { + continue outer + } + } + p.k = append(p.k, otherKey) + } +} + // ---------------------------------------------------------------------------- // check expands all values and returns an error if a circular reference or -- cgit v1.2.3