NAICNO / Jobanalyzer

Easy to use resource usage report
MIT License
0 stars 1 forks source link

Vet uses of strings.Split #699

Closed lars-t-hansen closed 21 hours ago

lars-t-hansen commented 21 hours ago

It turns out that strings.Split(s, ",") will return [""] if the input s is "". This is a footgun for casual uses. I see I have a few cases in the code where the input may be empty and it would be bad if the output is not an empty slice, so I need to fix these. Maybe it's time for go-utils/strings for a version that does not do this.