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:
@@ -16,7 +16,6 @@ func (b Bar) Foo() string {
|
||||
return string(b)
|
||||
}
|
||||
|
||||
//goose:provide
|
||||
func provideBar() Bar {
|
||||
return "Hello, World!"
|
||||
}
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
package main
|
||||
|
||||
//goose:use provideBar
|
||||
import (
|
||||
"codename/goose"
|
||||
)
|
||||
|
||||
func injectFooer() Fooer
|
||||
func injectFooer() Fooer {
|
||||
panic(goose.Use(provideBar))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user