Skip to content

Commit b2f570e

Browse files
authored
ini: allow changing the default section name (#319)
1 parent 6098d42 commit b2f570e

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

deprecated.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@
1414

1515
package ini
1616

17-
const (
17+
var (
1818
// Deprecated: Use "DefaultSection" instead.
1919
DEFAULT_SECTION = DefaultSection
20-
)
21-
22-
var (
2320
// Deprecated: AllCapsUnderscore converts to format ALL_CAPS_UNDERSCORE.
2421
AllCapsUnderscore = SnackCase
2522
)

ini.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ import (
2323
)
2424

2525
const (
26-
// DefaultSection is the name of default section. You can use this constant or the string literal.
27-
// In most of cases, an empty string is all you need to access the section.
28-
DefaultSection = "DEFAULT"
29-
3026
// Maximum allowed depth when recursively substituing variable names.
3127
depthValues = 99
3228
)
3329

3430
var (
31+
// DefaultSection is the name of default section. You can use this var or the string literal.
32+
// In most of cases, an empty string is all you need to access the section.
33+
DefaultSection = "DEFAULT"
34+
3535
// LineBreak is the delimiter to determine or compose a new line.
3636
// This variable will be changed to "\r\n" automatically on Windows at package init time.
3737
LineBreak = "\n"

0 commit comments

Comments
 (0)