1
0
mirror of https://github.com/golang/go synced 2024-11-05 11:46:12 -07:00
go/cmd
Roger Peppe 63e6ed9258 cmd/stringer: compile error when constants change
When constant values change but stringer has not
been run again, we can get misleading string values.
Protect against this by generating code that will fail
with a compiler error when this happens.
Most compilers should be smart enough to omit the
code containing the checks.

Change-Id: I7a36d20f014cba0e7d88851d1b649a098ee30d76
Reviewed-on: https://go-review.googlesource.com/c/tools/+/163637
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
2019-03-18 00:52:22 +00:00
..
benchcmp benchmark/parser, cmd/benchcmp: improve names of exported identifiers 2015-01-15 01:28:17 +00:00
bundle cmd/bundle: change the behavior of the -underscore flag 2018-12-01 03:58:26 +00:00
callgraph go/ssa/ssautil: add AllPackages method 2018-10-15 18:41:29 +00:00
compilebench cmd/compilebench: generate separate mem profiles when using -count 2019-03-14 00:31:01 +00:00
cover cmd/cover: check os.Create error im html output 2017-01-08 00:00:17 +00:00
digraph cmd/digraph: print usage on -h 2018-08-20 20:10:23 +00:00
eg cmd/eg: Gofmt eg's dry-run output. 2017-07-13 04:09:46 +00:00
fiximports all: set GO111MODULE=off for tests that use GOPATHs in testdata. 2018-10-03 17:21:27 +00:00
getgo godoc,cmd/getgo: update download links to dl.google.com 2018-01-25 02:56:30 +00:00
go-contrib-init cmd/go-contrib-init: exit with an error if package install fails 2017-07-17 03:20:55 +00:00
godex x/tools: remove old renaming imports of go/constant as exact 2018-08-10 17:04:37 +00:00
godoc godoc/env: replace with golangorgenv 2019-03-07 16:39:06 +00:00
goimports cmd/goimports: update Emacs install instructions 2018-11-30 05:20:23 +00:00
gomvpkg cmd/gomvpkg: add missing closing double-quote to documentation 2018-05-22 18:16:25 +00:00
gopls internal/lsp: changing server noun to serve verb 2019-02-11 22:49:14 +00:00
gorename cmd/godoc,cmd/gorename,refactor/rename: skip tests on GOOS=android 2019-03-06 15:27:20 +00:00
gotype gotype: fix default importer for Go 1.8. 2017-04-10 16:28:46 +00:00
goyacc cmd/goyacc: put //line annotations on the first column. 2018-09-26 03:27:08 +00:00
guru cmd/guru: fix guessImportPath for Windows 2019-02-25 23:45:24 +00:00
html2article x/tools/cmd/html2article: remove unused functions 2017-03-01 14:53:04 +00:00
present cmd/present: fix CSS when printing slides 2019-01-23 18:36:29 +00:00
splitdwarf splitdwarf: initial working commit 2019-01-09 16:56:30 +00:00
ssadump go/ssa/ssautil: add AllPackages method 2018-10-15 18:41:29 +00:00
stress cmd/stress: prefix logs with start date/time 2018-11-27 19:52:27 +00:00
stringer cmd/stringer: compile error when constants change 2019-03-18 00:52:22 +00:00
toolstash cmd/toolstash: don't try comparing "asm -V=full" output. 2017-11-02 22:54:56 +00:00