I can't understand the following behaviour in Go:
package main
import "fmt"
type Something string
func (a *Something) String() string {
return "Bye"
}
func main() {
a := Something("Hello")
fmt.Printf("%s\n", a)
fmt.Printf("%s\n", a.String())
}
Will output:
Hello
Bye
Somehow this feels kinda incosistent. Is this expected behaviour? Can someone help me out here?