1. package main
2. 3. import fmt "fmt" // Package implementing formatted I/O.
4. 5. func main() {
6. fmt.Printf("Hello, world\n");
7. }
8. 9. /*****************
10. Every Go source file declares, using a package statement, which package it's part of. It may also import other packages to use their facilities. This program imports the package fmt to gain access to our old, now capitalized and package-qualified, friend, fmt.Printf.
11. 12. Functions are introduced with the func keyword. The main package's main function is where the program starts running (after any initialization).
13. 14. String constants can contain Unicode characters, encoded in UTF-8. (In fact, Go source files are defined to be encoded in UTF-8.)
15. 16. The comment convention is the same as in C++:
17. *************/