I am wanting to populate a struct without passing it down as a param in a function. I have been doing it with using a parameter but it is becoming redundant that way. The way I want to achieve is:
type Foo struct {
Name string
Description string
FinalDescription string
}
var bar = Thing("blah", func() {
DescriptionOfThing("blah", func() {
FinalDescriptionOfThink("blahblahblah")
})
})
I am trying to obtain the following struct from the above:
bar{
Name: "blah",
Description: "blah",
FinalDescription: "blahblahblah",
}
Any help would be great!
