1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 00:00:50 +00:00

Merge pull request #3524 from Quasilyte/quasilyte/bytesreader

config/yaml: s/bytes.NewBuffer/bytes.NewReader/
This commit is contained in:
astaxie 2019-02-25 23:16:39 +08:00 committed by GitHub
commit 1483c1f545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@ func parseYML(buf []byte) (cnf map[string]interface{}, err error) {
}
}
data, err := goyaml2.Read(bytes.NewBuffer(buf))
data, err := goyaml2.Read(bytes.NewReader(buf))
if err != nil {
log.Println("Goyaml2 ERR>", string(buf), err)
return