3 ms·
Great article, especially #2. I found it strange how they didn't mention the stringer tool[1] in #5 though. [1]: https://godoc.org/golang.org/x/tools/cmd/strin
by ainar-g 11y ago
Great article, especially #2. I found it strange how they didn't mention the stringer tool[1] in #5 though.
[1]: https://godoc.org/golang.org/x/tools/cmd/stringer https://godoc.org/golang.org/x/tools/cmd/stringer
- igungor 11y agonot strange since stringer was not written yet. https://github.com/golang/tools/commit/2c5c896732f6bfdcc0360b5afe8b3345c6b2e758 https://github.com/golang/tools/commit/2c5c896732f6bfdcc0360...
- farslan 11y agoAuthor here. It was not written back then :) However it was used so much Rob decided to write a tool to auto generate the String method. So it's now very easy to generate and and it's also uses a much more efficient algorithm to return the string :)