fix comment

This commit is contained in:
buyuxiang
2022-05-24 20:50:53 +08:00
parent 682f1ecb94
commit d96baa789b
19 changed files with 82 additions and 1204 deletions

View File

@@ -286,7 +286,7 @@ func LoadFile(path string, structObj interface{}) (err error) {
return errors.Wrap(err, "read file failed")
}
// remove BOM at the beginning of file
file = bytes.Trim(file, "\xef\xbb\xbf")
file = bytes.TrimLeft(file, "\xef\xbb\xbf")
ext := filepath.Ext(path)
switch ext {
case ".json", ".har":