type A struct { name string firstName string}
a1 := A{"Mueller", "Max"}a2 := A{name: "Mueller", firstName: "Max"}Named.
package main
import ( "fmt" "unsafe")
type bar struct { A int _ bool}
type bar2 struct { A int _ [0]byte
}
func main() { bar := bar{} bar2 := bar2{} fmt.Printf("size of bar:%v\n", unsafe.Sizeof(bar)) fmt.Printf("size of bar2:%v\n", unsafe.Sizeof(bar2))} type bar2 struct {--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.