fr
fr

Question from the Go test

Medium

In the code above, what is the behavior of the call 's.Log()' and why?

type Logger struct{}
func (l Logger) Log() { fmt.Println("log") }

type Service struct {
    Logger
}
func (s Service) Log() { fmt.Println("service") }
Author: WeLoveDevsStatus: PublishedQuestion not yet passed
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!