Golang Hello World


This is my first post regarding Golang, this post intended to be my personal learning note:

Create Hello World

  1. Hello Word Tutorial
  2. Youtube Screencast
  3. My learning console :
  4. console-yusuf-go-hello-world
  5. Vim Golang File
  6. Golang-hello-world.png
  7. package main
    
    import "fmt"
    
    var (
    name, location, age = "Yoesoff", "Bandung", 17
    )
    
    func main() {
        fmt.Println("Welcome \n ");
        fmt.Printf("%s (%d) of %s", name, age, location)
        fmt.Println("\n ");
    }
  8. package main
    
    import "fmt"
    
    var (
        name, location, age = "Yoesoff", "Bandung", 17
    )
    
    //A variable can contain any type, including functions:
    func main() {
        action := func() {
            fmt.Println("Welcome 2 \n ");
            fmt.Printf("%s (%d) of %s", name, age, location)
            fmt.Println("\n ");
        }
        action()
    }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s