enumer
enumer copied to clipboard
go mod tidy will remove the reference to github.com/dmarkham/enumer from go.mod
This can be prevented by adding a tools.go file:
//go:build tools
package tools
import (
// Protect this entry in go.mod from being removed by go mod tidy.
_ "github.com/dmarkham/enumer"
)
Should probably go into README.md.
Context: The README currently says
For a module-aware repo with enumer in the go.mod file, generation can be called by adding the following to a .go source file:
//go:generate go run github.com/dmarkham/enumer -type=YOURTYPE
so that's why you might want enumer in your go.mod.
Could also be solved in a PR for issue #113 in conjunction with #91