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:
10
internal/goose/testdata/PkgImport/foo/foo.go
vendored
10
internal/goose/testdata/PkgImport/foo/foo.go
vendored
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"bar"
|
||||
"codename/goose"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -13,14 +14,15 @@ func main() {
|
||||
type Foo int
|
||||
type FooBar int
|
||||
|
||||
//goose:provide Set
|
||||
var Set = goose.NewSet(
|
||||
provideFoo,
|
||||
bar.ProvideBar,
|
||||
provideFooBar)
|
||||
|
||||
func provideFoo() Foo {
|
||||
return 41
|
||||
}
|
||||
|
||||
//goose:import Set "bar".Bar
|
||||
|
||||
//goose:provide Set
|
||||
func provideFooBar(foo Foo, barVal bar.Bar) FooBar {
|
||||
return FooBar(foo) + FooBar(barVal)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user