cmd/utils: improve documentation for SplitAndTrim

This commit is contained in:
ArvinFarrelP 2026-04-21 18:59:35 +07:00
parent ac406c2fe7
commit 09e6c88a55
No known key found for this signature in database
GPG key ID: 8C0AE50DA45372A9

View file

@ -1278,8 +1278,8 @@ func setNAT(ctx *cli.Context, cfg *p2p.Config) {
} }
} }
// SplitAndTrim splits input separated by a comma // SplitAndTrim splits a comma-separated string into substrings,
// and trims excessive white space from the substrings. // trims surrounding whitespace, and returns only non-empty strings.
func SplitAndTrim(input string) (ret []string) { func SplitAndTrim(input string) (ret []string) {
l := strings.Split(input, ",") l := strings.Split(input, ",")
for _, r := range l { for _, r := range l {