Generates a function for creating values of a struct type.

See: https://golang.org/doc/effective_go.html#composite_literals