Files
wire/internal/wire/testdata/NamingWorstCaseAllInOne/want/wire_gen.go
Giau. Tran Minh f5e937daa9 fix: run wire with -mod=mod (#353)
* fix: run wire with -mod=mod

* chore: update test with mod flag
2022-05-26 22:31:39 -07:00

52 lines
931 B
Go

// 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() {
}