goose: use marker functions instead of comments
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>
This commit is contained in:
12
internal/goose/testdata/InjectInput/foo/foo.go
vendored
12
internal/goose/testdata/InjectInput/foo/foo.go
vendored
@@ -1,6 +1,10 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"codename/goose"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println(injectFooBar(40))
|
||||
@@ -10,12 +14,14 @@ type Foo int
|
||||
type Bar int
|
||||
type FooBar int
|
||||
|
||||
//goose:provide Set
|
||||
var Set = goose.NewSet(
|
||||
provideBar,
|
||||
provideFooBar)
|
||||
|
||||
func provideBar() Bar {
|
||||
return 2
|
||||
}
|
||||
|
||||
//goose:provide Set
|
||||
func provideFooBar(foo Foo, bar Bar) FooBar {
|
||||
return FooBar(foo) + FooBar(bar)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user