dmarkham / enumer

A Go tool to auto generate methods for your enums
Other
410 stars 66 forks source link

fix: upgrade golang.org/x/tools for go 1.18 compatibility #59

Closed smlx closed 2 years ago

smlx commented 2 years ago

I have some code with this go:generate command:

//go:generate enumer -type=EnvironmentType -sql -transform=lower

When running go generate ./... with Go 1.18 I was getting an error like this on the latest version of enumer.

enumer: internal error: package "database/sql/driver" without types was imported from "github.com/uselagoon/ssh-portal/internal/lagoon"
internal/lagoon/environmenttype.go:3: running "enumer": exit status 1

This issue hinted that the error was due to an old version of golang.org/x/tools: https://github.com/golang/go/issues/37617

Sure enough, upgrading that dependency and rebuilding enumer allows it to work correctly when using the Go 1.18 standard library.

codecov-commenter commented 2 years ago

Codecov Report

Merging #59 (df780b2) into master (caff60e) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #59   +/-   ##
=======================================
  Coverage   66.23%   66.23%           
=======================================
  Files           4        4           
  Lines         465      465           
=======================================
  Hits          308      308           
  Misses        146      146           
  Partials       11       11           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update caff60e...df780b2. Read the comment docs.

nezorflame commented 2 years ago

@dmarkham any chance we can get this merged?

dmarkham commented 2 years ago

@dmarkham any chance we can get this merged? For sure thank you... let me cut a release.