From 90933ebec6d1404c6aa2858ff732f765440288f3 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 18 Jul 2022 20:46:02 +0200 Subject: [PATCH] fix: prefix with upper case letters --- pkg/section/parser.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/section/parser.go b/pkg/section/parser.go index aa87bc1..94e32af 100644 --- a/pkg/section/parser.go +++ b/pkg/section/parser.go @@ -25,10 +25,10 @@ func Parse(data []string) (SectionList, error) { list = append(list, Standard{}) } else if s == "newline" { list = append(list, NewLine{}) - } else if strings.HasPrefix(s, "prefix(") && len(s) > 8 { - list = append(list, Custom{s[7 : len(s)-1]}) - } else if strings.HasPrefix(s, "commentline(") && len(s) > 13 { - list = append(list, Custom{s[12 : len(s)-1]}) + } else if strings.HasPrefix(s, "prefix(") && len(d) > 8 { + list = append(list, Custom{d[7 : len(d)-1]}) + } else if strings.HasPrefix(s, "commentline(") && len(d) > 13 { + list = append(list, Custom{d[12 : len(d)-1]}) } else { errString += fmt.Sprintf(" %s", s) }