bldsh / dive

dive in to learn
Apache License 2.0
0 stars 0 forks source link

go: stringer: type: interface: one implementation for all #9

Open AmitKumarDas opened 2 weeks ago

AmitKumarDas commented 2 weeks ago

func newStringer(s string) fmt.Stringer { return (*Stringer)(&s) } func (s Stringer) String() string { return string(s) }