3 ms·
I'm not trying to brush off concerns. They're fair, but I don't think it's particularly fatal. If you're using stringer, you've opted into it by adding //go:gen
by dsymonds 12y ago
I'm not trying to brush off concerns. They're fair, but I don't think it's particularly fatal. If you're using stringer, you've opted into it by adding //go:generate lines to your source, and so if you're messing with your code you just have to remember to run `go generate` (or stick a comment near the constant definition to remind yourself). In practice you won't be messing with the constants a huge amount, and if you're using something like stringer then it's easy to keep that in mind.
- stock_toaster 12y agoWhat you said makes sense for a single-author codebase. For a shared codebase with many authors, I could envision it being an occasional problem, especially if misused/abused.
- jdunck 12y agoPre-commit hook should address your concern?