all: replace more panic(wire.Build(...)) calls with wire.Build(...); return stuff (google/go-cloud#248)
Fixes google/go-cloud#246
This commit is contained in:
7
wire.go
7
wire.go
@@ -30,7 +30,12 @@ func NewSet(...interface{}) ProviderSet {
|
||||
// providers to use. Its arguments are the same as NewSet. Its return
|
||||
// value is an error message that can be sent to panic.
|
||||
//
|
||||
// Example:
|
||||
// Examples:
|
||||
//
|
||||
// func injector(ctx context.Context) (*sql.DB, error) {
|
||||
// wire.Build(otherpkg.FooSet, myProviderFunc)
|
||||
// return nil, nil
|
||||
// }
|
||||
//
|
||||
// func injector(ctx context.Context) (*sql.DB, error) {
|
||||
// panic(wire.Build(otherpkg.FooSet, myProviderFunc))
|
||||
|
||||
Reference in New Issue
Block a user