package main
import "fmt"
// Text fn
type Text string
func (t Text) String() string {
return string(t)
}
func main() {
fmt.Println(Text("hi world").String())
}
I made a early assumption that all method receivers are structs. Need to back out of this now, so method.Recv() returns a Typer. More specifically, Also need to change it so Structer is type of Typer and update the breakage there:
Right now this will panic:
I made a early assumption that all method receivers are structs. Need to back out of this now, so
method.Recv()
returns a Typer. More specifically, Also need to change it soStructer
is type ofTyper
and update the breakage there:Inside: