Structure field declaration


(adriel) #1

Hello,

Anyone could explain the useful of structure below

type Attribute struct { 
    _ struct { } `type:"structure"`
}

Thank you.


(Ivan Matmati) #2

Hi,

Where does it come from ? Its use context would make it clearer about the structure itself.

Ivan.


(Ali Hassan) #3


type abc struct{
_ struct { } 'type : "structure " ’
}
when i run this code on my system, https://play.golang.org/p/um_BAZqTXls it give me
./prog.go:8:3: struct field tag type:structure not compatible with reflect.StructTag.Get: bad syntax for struct tag value


(Petergloor) #4

@Ali_Hassan: watch the quotes and the backticks around type:"structure".
Correctly typed it works: https://play.golang.org/p/jJmkaVx7L2n