Allow # comments in ini files
diff --git a/ini_private.go b/ini_private.go
index 4ccda73..71970de 100644
--- a/ini_private.go
+++ b/ini_private.go
@@ -199,7 +199,7 @@
line = strings.TrimSpace(line)
// Skip empty lines and lines starting with ; (comments)
- if len(line) == 0 || line[0] == ';' {
+ if len(line) == 0 || line[0] == ';' || line[0] == '#' {
continue
}
diff --git a/ini_test.go b/ini_test.go
index b60380e..8bb7acd 100644
--- a/ini_test.go
+++ b/ini_test.go
@@ -78,8 +78,8 @@
; PtrSlice =
[Other Options]
-; A slice of strings
-; StringSlice =
+# A slice of strings
+# StringSlice =
; A map from string to int
int-map = a:2