Suppose there's a 3rd party package that makes an interface available:
package giantpackage
type UselessInfo struct {
wontUse string
alsoWontUse string
}
type CoolInterface interface {
DoSomethingAwesome(ui UselessInfo) (string, error)
}
It seems easy to implement as such:
package main
import giantpackage
type Jedi struct {
name string
age int
}
func (j Jedi) DoSomethingAwesome(ui giantpackage.UselessInfo) (string, error)
return "Hello world.", nil
}
Assuming:
1) I don't actually use the UselessInfo struct in my DoSomethingAwesome function.
2) The package that I have to import is HUGE.
3) The package that I have to import is no longer maintained, and cannot be modified.
My question:
Is there any way to implement CoolInterface without importing giantpackage?