Skip to content
This repository was archived by the owner on Sep 1, 2025. It is now read-only.

Commit da1a2ec

Browse files
committed
BUG/MINOR: keep old behavior when fetching defaults with DefaultSectionName
1 parent c59dc5a commit da1a2ec

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

parser.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ const (
5555
const (
5656
CommentsSectionName = "data"
5757
GlobalSectionName = "data"
58-
DefaultSectionName = ""
5958
)
6059

60+
var DefaultSectionName = "" //nolint:gochecknoglobals
61+
6162
//nolint:interfacebloat
6263
type Parser interface {
6364
LoadData(path string) error

reader.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ func (p *configParser) ProcessLine(line string, parts []string, comment string,
194194
if !p.Options.NoNamedDefaultsFrom {
195195
p.lastDefaultsSectionName = data.Name
196196
}
197+
DefaultSectionName = data.Name
197198
case "global":
198199
config.Active = config.Global
199200
case "frontend":

0 commit comments

Comments
 (0)