1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
// Code generated by Wire. DO NOT EDIT.
//go:generate go run -mod=mod github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
package main
import (
context2 "context"
"fmt"
"os"
"reflect"
)
// Injectors from foo.go:
func inject(context3 context2.Context, err2 struct{}) (context, error) {
mainContext, err := Provide(context3)
if err != nil {
return context{}, err
}
return mainContext, nil
}
// foo.go:
type context struct{}
func main() {
if _, ok := reflect.TypeOf(context{}).MethodByName("Provide"); !ok {
fmt.Println("ERROR: context.Provide renamed")
os.Exit(1)
}
c, err := inject(context2.Background(), struct{}{})
if err != nil {
fmt.Println("ERROR:", err)
os.Exit(1)
}
fmt.Println(c)
}
func Provide(context2_2 context2.Context) (context, error) {
var context3 = context2.Background()
_ = context2_2
_ = context3
return context{}, nil
}
func (context) Provide() {
}
|