diff --git a/Makefile b/Makefile index 684df6966..0efe1938e 100644 --- a/Makefile +++ b/Makefile @@ -50,6 +50,7 @@ deps: @go get golang.org/x/tools/cmd/goimports @go get golang.org/x/tools/cmd/stringer @go get -u github.com/mna/pigeon + @go get github.com/alvaroloes/enumer dev: deps ## Build and install a development build @grep 'const VersionPrerelease = ""' version/version.go > /dev/null ; if [ $$? -eq 0 ]; then \ @@ -95,7 +96,7 @@ fmt-examples: # generate runs `go generate` to build the dynamically generated # source files. generate: deps ## Generate dynamically generated code - go generate . + go generate ./... gofmt -w common/bootcommand/boot_command.go goimports -w common/bootcommand/boot_command.go gofmt -w command/plugin.go diff --git a/provisioner/powershell/execution_policy.go b/provisioner/powershell/execution_policy.go index 5338282bc..5941aba3c 100644 --- a/provisioner/powershell/execution_policy.go +++ b/provisioner/powershell/execution_policy.go @@ -1,3 +1,5 @@ +//go:generate enumer -transform snake -trimprefix ExecutionPolicy -type ExecutionPolicy + package powershell import ( diff --git a/provisioner/powershell/executionpolicy_enumer.go b/provisioner/powershell/executionpolicy_enumer.go index 881a74b20..b8157b9cf 100644 --- a/provisioner/powershell/executionpolicy_enumer.go +++ b/provisioner/powershell/executionpolicy_enumer.go @@ -1,4 +1,4 @@ -// Code generated by "enumer -transform snake -trimprefix ExecutionPolicy -type ExecutionPolicy provisioner/powershell/execution_policy.go"; DO NOT EDIT. +// Code generated by "enumer -transform snake -trimprefix ExecutionPolicy -type ExecutionPolicy"; DO NOT EDIT. // package powershell