Structure field declaration

(adriel) #1


Anyone could explain the useful of structure below

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

Thank you.

(Ivan Matmati) #2


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


(Ali Hassan) #3

type abc struct{
_ struct { } 'type : "structure " ’
when i run this code on my system, 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: