j178 / leetgo

Best LeetCode friend for geek. :snowboarder:
MIT License
527 stars 33 forks source link

Utilize fmt.Stringer interface instead of ToString method #288

Closed alex-telpis closed 4 months ago

alex-telpis commented 4 months ago

Having a String() string method is a more idiomatic way to handle string representation, as implementing the fmt.Stringer interface makes it easier to work with the standard library.

https://go.dev/tour/methods/17