This question already has an answer here:
I was digging in AWS SDK source codes and came across with the following type declaration:
type Condition struct {
_ struct{} `type:"structure"`
// the rest of code is removed
}
Do anybody know purpose/explanation of this kind of embedding?
</div>
Its been used for code generation perposes. you can think of it like java which treats everything in it as an object.
example of using it is here
{{ $shapeList := ShapeListWithErrors $ }}
{{ range $_, $s := $shapeList }}
{{ if eq $s.Type "structure"}}{{ $s.GoCode }}{{ end }}
{{ end }}