Skip to content

Commit 33d2f60

Browse files
authored
Merge pull request #325 from numtide/fix/global-excludes
fix: configure toml keys for config fields
2 parents c3e3c05 + a77db52 commit 33d2f60

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

config/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
type Config struct {
1111
Global struct {
1212
// Excludes is an optional list of glob patterns used to exclude certain files from all formatters.
13-
Excludes []string
14-
}
13+
Excludes []string `toml:"excludes"`
14+
} `toml:"global"`
1515
Formatters map[string]*Formatter `toml:"formatter"`
1616
}
1717

config/formatter.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ package config
22

33
type Formatter struct {
44
// Command is the command to invoke when applying this Formatter.
5-
Command string
5+
Command string `toml:"command"`
66
// Options are an optional list of args to be passed to Command.
7-
Options []string
7+
Options []string `toml:"options,omitempty"`
88
// Includes is a list of glob patterns used to determine whether this Formatter should be applied against a path.
9-
Includes []string
9+
Includes []string `toml:"includes,omitempty"`
1010
// Excludes is an optional list of glob patterns used to exclude certain files from this Formatter.
11-
Excludes []string
11+
Excludes []string `toml:"excludes,omitempty"`
1212
// Indicates the order of precedence when executing this Formatter in a sequence of Formatters.
13-
Priority int
13+
Priority int `toml:"priority,omitempty"`
1414
}

0 commit comments

Comments
 (0)