Created
August 14, 2013 07:58
-
-
Save hodzanassredin/6228860 to your computer and use it in GitHub Desktop.
boolean trap solve in golang
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( | |
| "painter" | |
| "fmt" | |
| ) | |
| func main(){ | |
| res := painter.Repaint(painter.RepaintImmediate(false)) | |
| fmt.Println(res) | |
| } |
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 painter | |
| type RepaintImmediate bool | |
| func Repaint(mode RepaintImmediate) string { | |
| if mode { | |
| return "Immediate" | |
| } else { | |
| return "Deferred" | |
| } | |
| panic("unreachable code") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment