To avoid making this CL too large, I did not migrate the existing goose comments through the repository. This will be addressed in a subsequent CL. Reviewed-by: Tuo Shan <shantuo@google.com>
28 lines
316 B
Go
28 lines
316 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"codename/goose"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println(injectFooBar(40))
|
|
}
|
|
|
|
type Foo int
|
|
type Bar int
|
|
type FooBar int
|
|
|
|
var Set = goose.NewSet(
|
|
provideBar,
|
|
provideFooBar)
|
|
|
|
func provideBar() Bar {
|
|
return 2
|
|
}
|
|
|
|
func provideFooBar(foo Foo, bar Bar) FooBar {
|
|
return FooBar(foo) + FooBar(bar)
|
|
}
|