document wire.Struct first argument (#197)
This commit is contained in:
8
wire.go
8
wire.go
@@ -146,9 +146,11 @@ func InterfaceValue(typ interface{}, x interface{}) ProvidedValue {
|
|||||||
// A StructProvider represents a named struct.
|
// A StructProvider represents a named struct.
|
||||||
type StructProvider struct{}
|
type StructProvider struct{}
|
||||||
|
|
||||||
// Struct specifies that the given struct type will be provided by filling in the fields
|
// Struct specifies that the given struct type will be provided by filling in the fields in the struct that have the names given.
|
||||||
// in the struct that have the names given. Each of the arguments must be a name
|
//
|
||||||
// to the field they wish to reference. As a special case, if a single name "*"
|
// 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
|
||||||
|
// arguments are field names to fill in. As a special case, if a single name "*"
|
||||||
// is given, then all of the fields in the struct will be filled in.
|
// is given, then all of the fields in the struct will be filled in.
|
||||||
//
|
//
|
||||||
// For example:
|
// For example:
|
||||||
|
|||||||
Reference in New Issue
Block a user