Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
madkins23 opened this issue Jun 25, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@madkins23
Copy link

madkins23 commented Jun 25, 2023

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 madkins23 changed the title Minor documentation tweak go mod tidy will remove the reference to github.com/dmarkham/enumer from go.mod Jun 25, 2023
@theclapp
Copy link

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.

@samiam2013 samiam2013 self-assigned this Oct 12, 2024
@samiam2013 samiam2013 added the enhancement New feature or request label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants