Re: [go-nuts] Beginner Question About Structure Initialization

2017-11-22 Thread Jan Mercl
On Wed, Nov 22, 2017 at 7:03 PM wrote: > ./bad.go:12:18: syntax error: unexpected newline, expecting comma or } Fixed: https://play.golang.org/p/fk_fopK6V1 -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

[go-nuts] Beginner Question About Structure Initialization

2017-11-22 Thread jlforrest
I'm learning Go (using 1.9.2 on Centos 7). Consider the following trivial program, which works fine: package main import "fmt" type symbol struct { name string fn func(int) options int } func main() { symbols := [] symbol { {"jon",x, 4}, } symbols[0].fn(13)