Files
wire/internal/goose/testdata/InterfaceBinding/foo/foo.go

27 lines
313 B
Go
Raw Normal View History

package main
import "fmt"
func main() {
fmt.Println(injectFooer().Foo())
}
type Fooer interface {
Foo() string
}
type Bar string
func (b *Bar) Foo() string {
return string(*b)
}
//goose:provide
func provideBar() *Bar {
b := new(Bar)
*b = "Hello, World!"
return b
}
//goose:bind provideBar Fooer *Bar