Answer the question
In order to leave comments, you need to log in
How to force a pointer on an interface-parameter in Go?
type Interface interface {
Callme() (string, error)
}
func some(upl Interface) {
upl.Callme()
}
Answer the question
In order to leave comments, you need to log in
Just implement interface only for pointer to struct
func (ms *MyStruct) Callme() (string, error)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question