Last active
August 29, 2015 14:01
-
-
Save suntong/e99da3d47c4b3f028a50 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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