gdenn
4/20/2017 - 7:29 PM

composition.go

type composition interface {
  foo
  bar
}

type single struct {
}

type foo interface {
  foo_1()
  foo_2()
}

type bar interface {
  bar_1
  bar_2
}

func (s *single) foo_1() {}
func (s *single) foo_2() {}

func (s *single) bar_1() {}
func (s *single) bar_2() {}