Deviopath › Go

fmt.Stringer

Medium · Interfaces

fmt.Stringer is String() string. Implementing it is how a type describes itself. A Point should print as "(x,y)" with no spaces.

Write String() on Point. FormatPoint(x, y) is already written and calls it.

Next: JSON User