Skip to content

Commit a36b9c2

Browse files
author
xander
committed
renamed tag to constraint
1 parent 70ec302 commit a36b9c2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stringer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ var (
5959
)
6060

6161
var comments arrayFlags
62-
var buildTags arrayFlags
62+
var buildConstraints arrayFlags
6363

6464
func init() {
6565
flag.Var(&comments, "comment", "comments to include in generated code, can repeat. Default: \"\"")
66-
flag.Var(&buildTags, "buildtag", "build tag to include in the generated code, can repeat. Default: <none>")
66+
flag.Var(&buildConstraints, "buildconstraint", "build constraint to include in the generated code, can repeat. Default: <none>")
6767
}
6868

6969
// Usage is a replacement usage function for the flags package.
@@ -114,9 +114,9 @@ func main() {
114114

115115
// Print the header and package clause.
116116
g.Printf("// Code generated by \"enumer %s\"; DO NOT EDIT.\n", strings.Join(os.Args[1:], " "))
117-
if len(buildTags) > 0 {
118-
for _, tag := range buildTags {
119-
g.Printf("//go:build %s\n\n", tag)
117+
if len(buildConstraints) > 0 {
118+
for _, c := range buildConstraints {
119+
g.Printf("//go:build %s\n\n", c)
120120
}
121121
}
122122

0 commit comments

Comments
 (0)