Skip to content

Instantly share code, notes, and snippets.

@dmke
Last active May 22, 2017 16:58
Show Gist options
  • Save dmke/a59c76c1d65f5f822c03ff7557288475 to your computer and use it in GitHub Desktop.
Save dmke/a59c76c1d65f5f822c03ff7557288475 to your computer and use it in GitHub Desktop.
vscode-go #936
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 }
package main
var (
ch = make(chan sInt)
n = 42
)
type sInt struct {
i int
}
func main() {
ch <- sInt{n}
}
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