summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/magiconair/properties/properties.go
diff options
context:
space:
mode:
authorDuco van Amstel <helcaraxan@gmail.com>2018-11-18 17:55:05 +0000
committerWim <wim@42.be>2018-11-25 21:21:04 +0100
commit09875fe1603307080f3a4172985c5dca3bd9912d (patch)
treea23220772f6f6597d509ca71b2df3480a77b8076 /vendor/github.com/magiconair/properties/properties.go
parentf716b8fc0ff90f47b61e218ef34019b38bd70e0d (diff)
downloadmatterbridge-msglm-09875fe1603307080f3a4172985c5dca3bd9912d.tar.gz
matterbridge-msglm-09875fe1603307080f3a4172985c5dca3bd9912d.tar.bz2
matterbridge-msglm-09875fe1603307080f3a4172985c5dca3bd9912d.zip
Update direct dependencies where possible
Diffstat (limited to 'vendor/github.com/magiconair/properties/properties.go')
-rw-r--r--vendor/github.com/magiconair/properties/properties.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/vendor/github.com/magiconair/properties/properties.go b/vendor/github.com/magiconair/properties/properties.go
index 53f5b2ff..cb3d1a33 100644
--- a/vendor/github.com/magiconair/properties/properties.go
+++ b/vendor/github.com/magiconair/properties/properties.go
@@ -1,4 +1,4 @@
-// Copyright 2017 Frank Schroeder. All rights reserved.
+// Copyright 2018 Frank Schroeder. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -83,6 +83,17 @@ func NewProperties() *Properties {
}
}
+// Load reads a buffer into the given Properties struct.
+func (p *Properties) Load(buf []byte, enc Encoding) error {
+ l := &Loader{Encoding: enc, DisableExpansion: p.DisableExpansion}
+ newProperties, err := l.LoadBytes(buf)
+ if err != nil {
+ return err
+ }
+ p.Merge(newProperties)
+ return nil
+}
+
// Get returns the expanded value for the given key if exists.
// Otherwise, ok is false.
func (p *Properties) Get(key string) (value string, ok bool) {