Skip to content

Commit

Permalink
document wire.Struct first argument (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
shantuo committed Jun 18, 2019
1 parent 93b1ce7 commit 89cb901
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions wire.go
Expand Up @@ -146,9 +146,11 @@ 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. Each of the arguments must be a name
// to the field they wish to reference. As a special case, if a single name "*"
// 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
// 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.
//
// For example:
Expand Down

0 comments on commit 89cb901

Please sign in to comment.