Anonymous - 2017-03-01

Originally posted by: trumae

Promoted fields act like ordinary fields of a struct except that they cannot be used as field names in composite literals of the struct.

Promoted fields are a problem to initialize structs representing an large component.

Possible solutions:

  • Constructor
  • structs without inherited field - all fields flat.