Back to Developer Roadmap

goto (discouraged)

src/data/roadmaps/golang/content/goto-discouraged@O29VoTfPiU8GZ_c16ZJIp.md

4.0843 B
Original Source

goto (discouraged)

Go includes goto statement but discourages its use. Can only jump to labels within same function. Creates unstructured code flow making programs hard to read, debug, and maintain. Use structured control flow (loops, functions, conditionals) instead. Rarely needed in modern Go programming.

Visit the following resources to learn more: