Advertisement
Guest User

Go Hello World by Mendax v2.0

a guest
Jan 6th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.47 KB | None | 0 0
  1. //Go has many was of displaying text into a console
  2. package main
  3. /*Bracket is present to import repeatedly without having to type import every time
  4. *Example
  5. *import (
  6. *       "fmt"
  7. *        "net"
  8. *        "strconv"
  9. *)
  10. */
  11. import (
  12.     "fmt"
  13. )
  14. //Example of a go method
  15. func world() {
  16.     fmt.Println(" World")
  17. }
  18. func main() {
  19.     fmt.Print("Hello")
  20.     world()
  21.     print("Hello")
  22.     world()
  23.     fmt.Printf("Hello")
  24.     world()
  25.     fmt.Println("Hello World")
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement