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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/signal" | |
| ) | |
| func main() { |
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
| define -> | |
| rAF = window["requestAnimationFrame"] | |
| cAF = window["cancelAnimationFrame"] | |
| # based on polyfill by Erik Möller, | |
| # with fixes from Paul Irish and Tino Zijdel. | |
| # https://gist.github.com/1579671 | |
| if !rAF or !cAF then do -> | |
| for v in ['ms', 'moz', 'webkit', 'o'] |
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
| package main | |
| import "fmt" | |
| func main() { | |
| var m map[int]string | |
| fmt.Printf("m = %v; m == nil? %t\n", m, m == nil) | |
| // it is safe to range over a nil map | |
| for i, v := range m { |
NewerOlder