Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Foo struct {
- ID int
- }
- type Bar struct {
- ID int
- }
- func convertAtoB(a A) *B {
- return &B{a.ID}
- }
- func (a* A) convertToB() *B {
- return &B{a.ID}
- }
- type Name Struct {
- ...
- funcSlot interface{}
- ...
- }
- func (n *Name) FuncName() error {
- return nil
- }
- func NewName() (n *Name) {
- ...
- n.funcSlot = (*Name).FuncName
- ...
- }
- type NAME interface {
- ...
- FuncName() error
- ...
- }
Add Comment
Please, Sign In to add comment