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:
@@ -1,6 +1,10 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"codename/goose"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// I'm on the fence as to whether this should be an error (versus an
|
||||
@@ -12,12 +16,14 @@ func main() {
|
||||
type Foo int
|
||||
type Bar int
|
||||
|
||||
//goose:provide Set
|
||||
var Set = goose.NewSet(
|
||||
provideFoo,
|
||||
provideBar)
|
||||
|
||||
func provideFoo() Foo {
|
||||
return -888
|
||||
}
|
||||
|
||||
//goose:provide Set
|
||||
func provideBar(foo Foo) Bar {
|
||||
return 2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user