Last active
May 22, 2017 16:58
-
-
Save dmke/a59c76c1d65f5f822c03ff7557288475 to your computer and use it in GitHub Desktop.
vscode-go #936
This file contains 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 | |
var n = func() int { return 42 }() | |
var ( | |
m = func() int { return 23 }() | |
o = getTruth() | |
) | |
func main() { | |
n += m + o | |
} | |
func getTruth() int { return 42 } |
This file contains 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 | |
var ( | |
ch = make(chan sInt) | |
n = 42 | |
) | |
type sInt struct { | |
i int | |
} | |
func main() { | |
ch <- sInt{n} | |
} |
This file contains 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 | |
var ch = make(chan *sInt) | |
var ( | |
n = 42 | |
) | |
type sInt struct { | |
i int | |
} | |
func main() { | |
ch <- &sInt{n} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment