diff options
| author | Martin Atkins <mart@degeneration.co.uk> | 2022-06-09 14:52:04 -0700 |
|---|---|---|
| committer | James Bardin <j.bardin@gmail.com> | 2023-10-24 10:54:03 -0400 |
| commit | d23a20ac41349e5f1cc7b60e76d1408069db498b (patch) | |
| tree | 97a381e84afe5c485f3b85c60b46bc97df91b0fc /json | |
| parent | 341ffa4a53c759c2e515418224d7a05f67ee7981 (diff) | |
Run "stringer" using "go run"
In the modern Go Modules-based toolchain we can avoid the need to globally
install this tool first by running it this way. As a bonus, the toolchain
will also install the version of the module we have specified in go.mod,
thereby locking us in to a particular version until we intentionally
upgrade.
The other third-party generator tools we use here aren't written in Go and
so we can't do the same for those right now, but maybe we'll find a nicer
way to handle those later too.
Diffstat (limited to 'json')
| -rw-r--r-- | json/scanner.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/json/scanner.go b/json/scanner.go index cae8485..a5e2130 100644 --- a/json/scanner.go +++ b/json/scanner.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/hcl/v2" ) -//go:generate stringer -type tokenType scanner.go +//go:generate go run golang.org/x/tools/cmd/stringer -type tokenType scanner.go type tokenType rune const ( |
