diff options
author | Wim <wim@42.be> | 2020-12-31 14:48:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-31 14:48:12 +0100 |
commit | 4f20ebead36876a88391bf033d1de3e4cf0228da (patch) | |
tree | 70b6fd79c6a5e00c958c29a7bd3926f074e76ba6 /vendor/gopkg.in/ini.v1/file.go | |
parent | a9f89dbc645aafc68daa9fc8d589f55104b535c7 (diff) | |
download | matterbridge-msglm-4f20ebead36876a88391bf033d1de3e4cf0228da.tar.gz matterbridge-msglm-4f20ebead36876a88391bf033d1de3e4cf0228da.tar.bz2 matterbridge-msglm-4f20ebead36876a88391bf033d1de3e4cf0228da.zip |
Update vendor for next release (#1343)
Diffstat (limited to 'vendor/gopkg.in/ini.v1/file.go')
-rw-r--r-- | vendor/gopkg.in/ini.v1/file.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/gopkg.in/ini.v1/file.go b/vendor/gopkg.in/ini.v1/file.go index 2fcd8de6..b96d172c 100644 --- a/vendor/gopkg.in/ini.v1/file.go +++ b/vendor/gopkg.in/ini.v1/file.go @@ -302,6 +302,9 @@ func (f *File) Reload() (err error) { } return err } + if f.options.ShortCircuit { + return nil + } } return nil } @@ -454,6 +457,8 @@ func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { val = `"""` + val + `"""` } else if !f.options.IgnoreInlineComment && strings.ContainsAny(val, "#;") { val = "`" + val + "`" + } else if len(strings.TrimSpace(val)) != len(val) { + val = `"` + val + `"` } if _, err := buf.WriteString(equalSign + val + LineBreak); err != nil { return nil, err @@ -497,7 +502,7 @@ func (f *File) WriteTo(w io.Writer) (int64, error) { // SaveToIndent writes content to file system with given value indention. func (f *File) SaveToIndent(filename, indent string) error { // Note: Because we are truncating with os.Create, - // so it's safer to save to a temporary file location and rename afte done. + // so it's safer to save to a temporary file location and rename after done. buf, err := f.writeToBuffer(indent) if err != nil { return err |