Skip to content

Commit

Permalink
ini: allow changing the default section name (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
jade-clarke authored Aug 8, 2022
1 parent 6098d42 commit b2f570e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions deprecated.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@

package ini

const (
var (
// Deprecated: Use "DefaultSection" instead.
DEFAULT_SECTION = DefaultSection
)

var (
// Deprecated: AllCapsUnderscore converts to format ALL_CAPS_UNDERSCORE.
AllCapsUnderscore = SnackCase
)
8 changes: 4 additions & 4 deletions ini.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ import (
)

const (
// DefaultSection is the name of default section. You can use this constant or the string literal.
// In most of cases, an empty string is all you need to access the section.
DefaultSection = "DEFAULT"

// Maximum allowed depth when recursively substituing variable names.
depthValues = 99
)

var (
// DefaultSection is the name of default section. You can use this var or the string literal.
// In most of cases, an empty string is all you need to access the section.
DefaultSection = "DEFAULT"

// LineBreak is the delimiter to determine or compose a new line.
// This variable will be changed to "\r\n" automatically on Windows at package init time.
LineBreak = "\n"
Expand Down

0 comments on commit b2f570e

Please sign in to comment.