...
Then in package b
Code Block | ||
---|---|---|
| ||
package b import "a" type b struct{} // implements the bapi.B interface. func (x b) Bar() { a.Foo(x) } func Bar() { var x b; x.Bar() } |
And sub-directory bapi
Code Block | ||
---|---|---|
| ||
package bapi type B interface { Bar() } |
...
...
Then in package b
Code Block | ||
---|---|---|
| ||
package b import "a" type b struct{} // implements the bapi.B interface. func (x b) Bar() { a.Foo(x) } func Bar() { var x b; x.Bar() } |
And sub-directory bapi
Code Block | ||
---|---|---|
| ||
package bapi type B interface { Bar() } |
...