Imagine a package that exports some structs and some functions.
If I wanted to make a wrapper around that package, so that it could be used as a drop-in, should I recreate the structs with the old struct embedded in it? Example:
package foo
type Foo struct {
Field string
}
func DoSomething() {
}
package bar
import foo
type Foo struct {
foo.Foo
}
func DoSomething() {
foo.DoSomething()
}
Is there a better way? Is this the idiomatic way?