Look at the following code snippet.
package main
import "fmt"
type Empty struct {
Field1, Field2 string
}
func main() {
value := Empty{}
fmt.Println(value == nil)
fmt.Printf("%p", &value)
}
I've got compiler error
./empty_struct.go:19: cannot convert nil to type Empty
How can I check a value struct type, if it is empty or not?