type Stacker interface {
isEmpty()bool
size()int
// many more function definitons
}
type StackSlice struct {
s []int;
x int
}
func makeStackSlice() Stacker {
s := &StackSlice{
s: make([]int,0, 100),
}
return s
}
Gives me error- cannot use s (type *StackSlice) as type Stacker in return argument:
*StackSlice does not implement Stacker (missing isEmpty method)