Let\'s say I have a struct with another struct embedded in it.
type Base struct {
ID string
}
type Child struct {
Base
a int
b int
}
Go issue 9859 proposes a change the the language to support the Child{ ID: id, a: a, b: b }
syntax from the question.
Use nested composite literals to initialize a value in a single expression:
child := Child{Base: Base{ID: id}, a: a, b: b}
It is not possible to hide the fact that a field is promoted from an embedded struct.