This is the 10th day of my participation in Gwen Challenge
Any recommendations for the coding style of Go?
While there is no specific coding style guide, there are a few “Go styles” that are generally agreed upon.
Go has a few conventions for naming, layout, and file organization. The Effective Go website contains suggestions on these topics. Further, the program Go FMT is a great format organizer whose purpose is to enforce a canonical code style; The vast majority of the current GO repository code and open source code is canonical style through GO FMT.
Convention N. Interpretation NCopy the code
How is the Go library documentation organized?
There is a program in Go called “Godoc” that extracts package documentation (i.e. comments) from source code and generates a website to access. Run it at golang.org/pkg. In fact, this site is implemented by Godoc.
Godoc can be configured to display symbols, static analysis, and more in detail in your program at golang.org/lib/godoc/a…
To access documents from the command line, Go Tool has the DOC subcommand, which provides some text interfaces.
It can be textual or interactiveCopy the code
Why are maps, slices, channels all references, and arrays true value types?
This topic has been discussed for a long time. In the early days, maps and Channels were syntax Pointers, and it was impossible to declare or use non-pointer instances. Of course, we agonized over how arrays should be designed. In the end, we decided that strictly separating Pointers and values would make the language harder to use, so changing references to these types to change their associated values would solve these problems. This change adds some unfortunate complexity to the language, but it has a big impact on usability.
PS: : I don’t think so.