Which method is best (most idomatic) for testing non-empty strings (in Go)?

if len(mystring) > 0 { }

Or:

if mystring != "" { }

Or something else?

11 Answers
11

Leave a Reply

Your email address will not be published. Required fields are marked *