Skip to content

Commit 7c5d312

Browse files
committed
chore: switch to enumer
Also bump version of assert used to latest that includes `Exclude[T]()` support.
1 parent 4a20bb7 commit 7c5d312

File tree

8 files changed

+96
-34
lines changed

8 files changed

+96
-34
lines changed

Bitfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ DEST = ./build
77
build:
88
go build -v -o %{DEST}/bit ./cmd/bit
99

10-
parser/override_string.go: parser/parser.go
10+
parser/override_enumer.go: parser/parser.go
1111
build: go generate %{IN}

bin/.stringer-0.1.12.pkg

Lines changed: 0 additions & 1 deletion
This file was deleted.

bin/stringer

Lines changed: 0 additions & 1 deletion
This file was deleted.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module github.com/alecthomas/bit
33
go 1.21.0
44

55
require (
6-
github.com/alecthomas/assert/v2 v2.3.0
6+
github.com/alecthomas/assert/v2 v2.4.0
77
github.com/alecthomas/kong v0.8.0
88
github.com/alecthomas/participle/v2 v2.1.0
9-
github.com/alecthomas/repr v0.2.0
9+
github.com/alecthomas/repr v0.3.0
1010
github.com/bmatcuk/doublestar/v4 v4.6.0
1111
github.com/creack/pty v1.1.18
1212
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0=
22
github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ=
3+
github.com/alecthomas/assert/v2 v2.4.0 h1:/ZiZ0NnriAWPYYO+4eOjgzNELrFQLaHNr92mHSHFj9U=
4+
github.com/alecthomas/assert/v2 v2.4.0/go.mod h1:fw5suVxB+wfYJ3291t0hRTqtGzFYdSwstnRQdaQx2DM=
35
github.com/alecthomas/kong v0.8.0 h1:ryDCzutfIqJPnNn0omnrgHLbAggDQM2VWHikE1xqK7s=
46
github.com/alecthomas/kong v0.8.0/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U=
57
github.com/alecthomas/participle/v2 v2.1.0 h1:z7dElHRrOEEq45F2TG5cbQihMtNTv8vwldytDj7Wrz4=
68
github.com/alecthomas/participle/v2 v2.1.0/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c=
79
github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
810
github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
11+
github.com/alecthomas/repr v0.3.0 h1:NeYzUPfjjlqHY4KtzgKJiWd6sVq2eNUPTi34PiFGjY8=
12+
github.com/alecthomas/repr v0.3.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
913
github.com/bmatcuk/doublestar/v4 v4.6.0 h1:HTuxyug8GyFbRkrffIpzNCSK4luc0TY3wzXvzIZhEXc=
1014
github.com/bmatcuk/doublestar/v4 v4.6.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
1115
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=

parser/override_enumer.go

Lines changed: 86 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

parser/override_string.go

Lines changed: 0 additions & 26 deletions
This file was deleted.

parser/parser.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func ParseRefList(parent lexer.Position, text string) (*RefList, error) {
6565
return refs, nil
6666
}
6767

68-
//go:generate stringer -type=Override -linecomment
68+
//go:generate enumer -type=Override -linecomment
6969
type Override int
7070

7171
const (
@@ -77,8 +77,8 @@ const (
7777

7878
var _ participle.Parseable = (*Override)(nil)
7979

80-
func (o *Override) GoString() string {
81-
switch *o {
80+
func (o Override) GoString() string {
81+
switch o {
8282
case OverrideReplace:
8383
return "OverrideReplace"
8484
case OverridePrepend:

0 commit comments

Comments
 (0)