j178 / leetgo

Best LeetCode friend for geek. :snowboarder:
MIT License
539 stars 32 forks source link

Utilize fmt.Stringer interface instead of ToString method #288

Closed alex-telpis closed 8 months ago

alex-telpis commented 8 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