goose: allow multiple arguments to use and import
Reviewed-by: Tuo Shan <shantuo@google.com>
This commit is contained in:
22
internal/goose/testdata/MultiImport/foo/foo.go
vendored
Normal file
22
internal/goose/testdata/MultiImport/foo/foo.go
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println(injectFooBar())
|
||||
}
|
||||
|
||||
type Foo int
|
||||
type FooBar int
|
||||
|
||||
//goose:provide Foo
|
||||
func provideFoo() Foo {
|
||||
return 41
|
||||
}
|
||||
|
||||
//goose:provide FooBar
|
||||
func provideFooBar(foo Foo) FooBar {
|
||||
return FooBar(foo) + 1
|
||||
}
|
||||
|
||||
//goose:import Set Foo FooBar
|
||||
Reference in New Issue
Block a user