wire: FieldsOf now provides a pointer to the field type as well as the actual field type (#209)

This commit is contained in:
Robert van Gent
2019-09-03 12:57:57 -07:00
committed by GitHub
parent 66f78fc846
commit 2b7d1205a1
9 changed files with 69 additions and 26 deletions

View File

@@ -146,7 +146,8 @@ func InterfaceValue(typ interface{}, x interface{}) ProvidedValue {
// A StructProvider represents a named struct.
type StructProvider struct{}
// Struct specifies that the given struct type will be provided by filling in the fields in the struct that have the names given.
// Struct specifies that the given struct type will be provided by filling in
// the fields in the struct that have the names given.
//
// The first argument must be a pointer to the struct type. For a struct type
// Foo, Wire will use field-filling to provide both Foo and *Foo. The remaining