2012-09-6

Go: Hello World

Hello world program in Go:

File: hello.go
--------------
package main

import "fmt"

func main() {
    fmt.Println("Hello World!")
}

Run it with:

$ go run hello.go

Or compile it with:

$ go build hello.go

and run the executable as:

$ ./hello
Standard

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 )

Facebook photo

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

Connecting to %s