mirror of
https://github.com/astaxie/beego.git
synced 2024-11-16 17:20:55 +00:00
commit
9c0aad06c5
@ -66,6 +66,12 @@ func (ini *IniConfig) Parse(name string) (ConfigContainer, error) {
|
|||||||
|
|
||||||
var comment bytes.Buffer
|
var comment bytes.Buffer
|
||||||
buf := bufio.NewReader(file)
|
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
|
section := DEFAULT_SECTION
|
||||||
for {
|
for {
|
||||||
line, _, err := buf.ReadLine()
|
line, _, err := buf.ReadLine()
|
||||||
|
Loading…
Reference in New Issue
Block a user