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:
14
internal/goose/testdata/StructPointer/foo/foo.go
vendored
14
internal/goose/testdata/StructPointer/foo/foo.go
vendored
@@ -1,6 +1,10 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"codename/goose"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fb := injectFooBar()
|
||||
@@ -10,18 +14,20 @@ func main() {
|
||||
type Foo int
|
||||
type Bar int
|
||||
|
||||
//goose:provide Set
|
||||
type FooBar struct {
|
||||
Foo Foo
|
||||
Bar Bar
|
||||
}
|
||||
|
||||
//goose:provide Set
|
||||
func provideFoo() Foo {
|
||||
return 41
|
||||
}
|
||||
|
||||
//goose:provide Set
|
||||
func provideBar() Bar {
|
||||
return 1
|
||||
}
|
||||
|
||||
var Set = goose.NewSet(
|
||||
FooBar{},
|
||||
provideFoo,
|
||||
provideBar)
|
||||
|
||||
Reference in New Issue
Block a user