Skip to content

Instantly share code, notes, and snippets.

@suntong suntong/main.go
Last active Aug 29, 2015

Embed
What would you like to do?
// http://play.golang.org/p/FOe85j-O-n
package main
import (
"fmt"
"os"
"time"
)
const Const = 1 + 1
type Bar struct {
key string
value int
}
func foo() (int, string) { return 5, "hi" }
func main() {
foo()
for i := 1; i <= 10 || false; i++ {
time.Sleep(1000 * time.Millisecond)
if i%3 != 0 {
fmt.Println(i)
} else {
fmt.Fprintf(os.Stderr, "[stderr] %02d\n", i)
}
}
i := Bar{"i", 1236}
i.value++
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.