From d23a20ac41349e5f1cc7b60e76d1408069db498b Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Thu, 9 Jun 2022 14:52:04 -0700 Subject: 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. --- json/scanner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'json') 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 ( -- cgit v1.2.3