content

  • empty struct is a struct without any fields, taking 0 byte of memory
// named
type emptyStruct struct {}
empty_struct := emptyStruct{}
// anonymous
empty_struct := struct{}{}

up

down

reference