1
0
mirror of https://github.com/golang/go synced 2024-11-05 11:46:12 -07:00
go/cmd
Adam Williams 9dc88fb721 cmd/stringer: remove redundant check in generated code
In a certain case, stringer would generate the following check for an
an unsigned integer i: "0 <= i". This changes stringer to not generate
such a check.

Also adds an additional test case for an unsigned multiple run that does
not include zero. There was already a case ("unum") that included an
unsigned multiple run starting at zero. This case's output was updated
accordingly.

Fixes golang/go#36461

Change-Id: I57e79384a0b802fa4571e2b3495db168b814bcaa
Reviewed-on: https://go-review.googlesource.com/c/tools/+/214180
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
2020-01-14 01:55:19 +00:00
..
auth cmd/auth/cookieauth: add a GOAUTH implementation that reads from a cookiefile 2019-04-05 18:06:40 +00:00
benchcmp cmd/benchcmp: add unit test for formatNs function 2019-11-14 16:00:03 +00:00
bundle cmd/bundle: add -tags flag 2019-11-04 19:56:21 +00:00
callgraph all: skip tests if required tools are not found 2019-08-30 15:40:57 +00:00
compilebench cmd/compilebench: add more linker benchmarking 2019-09-11 14:31:56 +00:00
cover all: do not write to testdata directories 2019-08-30 17:05:20 +00:00
digraph cmd/digraph: omit unnecessary empty lines in focus 2019-11-20 15:59:38 +00:00
eg cmd/eg: Gofmt eg's dry-run output. 2017-07-13 04:09:46 +00:00
fiximports cmd/fiximports: fix 'go list' error formatting 2019-12-17 20:38:50 +00:00
getgo cmd/getgo/server: update to go112 GAE runtime 2019-08-22 19:19:35 +00:00
go-contrib-init cmd/go-contrib-init: add unit test for the cmdErr function 2019-11-11 20:03:10 +00:00
godex x/tools: remove old renaming imports of go/constant as exact 2018-08-10 17:04:37 +00:00
godoc cmd/godoc: delete unused autocert hooks 2019-11-21 21:43:50 +00:00
goimports imports: pass more of the environment 2019-12-17 00:36:01 +00:00
gomvpkg cmd/gomvpkg: add missing closing double-quote to documentation 2018-05-22 18:16:25 +00:00
gorename all: skip tests if required tools are not found 2019-08-30 15:40:57 +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 all: do not write to testdata directories 2019-08-30 17:05:20 +00:00
html2article x/tools/cmd/html2article: remove unused functions 2017-03-01 14:53:04 +00:00
present cmd/present: fix origin mismatch for websocket when using HTTPS 2019-10-14 20:52:21 +00:00
splitdwarf cmd/splitdwarf: fix skip on Windows 2019-05-25 14:57:41 +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: remove redundant check in generated code 2020-01-14 01:55:19 +00:00
toolstash cmd/toolstash: don't try comparing "asm -V=full" output. 2017-11-02 22:54:56 +00:00