Skip to content

Instantly share code, notes, and snippets.

@fk2000
Last active October 16, 2016 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fk2000/70f06cf8fbe7ec27f8a2d880ff1ff4dc to your computer and use it in GitHub Desktop.
Save fk2000/70f06cf8fbe7ec27f8a2d880ff1ff4dc to your computer and use it in GitHub Desktop.
package main
import "fmt"
func main() {
fmt.Println("Hello World!")
}
$ ls -ltr
total 3160
-rw-r--r-- 1 val staff 76 Oct 7 10:47 hello.go
-rwxr-xr-x 1 val staff 1607616 Oct 7 10:47 hello
$ ./hello
Hello World!
$ go run hello.go
Hello World!
package main
import (
"fmt"
"time"
)
func main() {
fmt.Println("The current time is", time.Now())
}
$ go run time.go
The current time is 2016-10-07 11:00:11.027383849 +0900 JST
$ date
Fri Oct 7 11:00:19 JST 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment