enumer icon indicating copy to clipboard operation
enumer copied to clipboard

go mod tidy will remove the reference to github.com/dmarkham/enumer from go.mod

Open madkins23 opened this issue 2 years ago • 2 comments

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.

madkins23 avatar Jun 25 '23 00:06 madkins23

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.

theclapp avatar Oct 11 '24 18:10 theclapp

Could also be solved in a PR for issue #113 in conjunction with #91

samiam2013 avatar Aug 15 '25 21:08 samiam2013