Why does switch match a different type in below code sample in golang
<p>Link:
<a href="https://play.golang.org/p/69I8PAuoAV" rel="nofollow noreferrer">https://play.golang.org/p/69I8PAuoAV</a></p>

<p>Extract:</p>

<pre><code>package main

import "fmt"

type Stringer interface {
    String() string
}

type fakeString struct {
    content string
}

// function used to implement the Stringer interface
func (s *fakeString) String() string {
    return s.content
}

func printString(value interface{}) {
    switch str := value.(type) {
    case string:
        fmt.Println(str)
    case Stringer:
        fmt.Println(str.String())
    }
}

func main() {
    s := &amp;fakeString{"Ceci n'est pas un string"}
    printString(s)
    printString("Hello, Gophers")

}
</code></pre>

<p>The <code>printString(s)</code> function call when reaching case matches the <code>case Stringer</code> part.
<code>s</code> is of type <code>*fakeString</code> not <code>Stringer</code>.
Why does it match <code>Stringer</code>.</p>

<p>I did a <code>fmt.Println(reflect.TypeOf(str))</code> and it confirmed the type as <code>*main.fakeString</code></p>