Commit 9c0aad06 authored by astaxie's avatar astaxie

Merge pull request #880 from chenghuama/patch-3

Update ini.go
parents 710f5b62 180c6aaf
......@@ -66,6 +66,12 @@ func (ini *IniConfig) Parse(name string) (ConfigContainer, error) {
var comment bytes.Buffer
buf := bufio.NewReader(file)
head, err := buf.Peek(3)
if err == nil && head[0] == 239 && head[1] == 187 && head[2] == 191 {
for i := 1; i <= 3; i++ {
buf.ReadByte()
}
}
section := DEFAULT_SECTION
for {
line, _, err := buf.ReadLine()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment