type Foobar C.struct_foobar
vs.
type Foobar struct {
foobar C.struct_foobar
}
Which one has which (dis)advantages for writing Golang bindings for a C lib?
type Foobar C.struct_foobar
vs.
type Foobar struct {
foobar C.struct_foobar
}
Which one has which (dis)advantages for writing Golang bindings for a C lib?
The second example clearly shows a data structure not accessible from other packages.
With the first one this would be impossible.