Created
December 10, 2012 22:06
-
-
Save igm/4253786 to your computer and use it in GitHub Desktop.
State Function Type
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
| type connectionStateFn func(*conn) connectionStateFn | |
| func (this *conn) run() { | |
| for state := openConnectionState; state != nil; { | |
| state = state(this) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment