ini: change minimum Go requirement to 1.6

This commit is contained in:
Unknwon
2018-07-11 20:55:23 +08:00
parent cec2bdc490
commit fa6ee696e4
3 changed files with 3 additions and 3 deletions
+1 -2
View File
@@ -390,8 +390,7 @@ func (f *File) parse(reader io.Reader) (err error) {
// Section
if line[0] == '[' {
// Read to the next ']' (TODO: support quoted strings)
// TODO(unknwon): use LastIndexByte when stop supporting Go1.4
closeIdx := bytes.LastIndex(line, []byte("]"))
closeIdx := bytes.LastIndexByte(line, ']')
if closeIdx == -1 {
return fmt.Errorf("unclosed section: %s", line)
}