Set splits comma-separated values onto the accumulator, matching the original fieldalignment CLI (`a,b,c` is equivalent to three repeats). Empty entries are dropped to avoid spurious "" matches. Never errors. Not concurrency-safe — run clones the flag slices at start.
(value string)
| 148 | // are dropped to avoid spurious "" matches. Never errors. Not concurrency-safe |
| 149 | // — run clones the flag slices at start. |
| 150 | func (f *StringArrayFlag) Set(value string) error { |
| 151 | for v := range strings.SplitSeq(value, ",") { |
| 152 | v = strings.TrimSpace(v) |
| 153 | if v == "" { |
| 154 | continue |
| 155 | } |
| 156 | *f = append(*f, v) |
| 157 | } |
| 158 | return nil |
| 159 | } |
| 160 | |
| 161 | var Analyzer = &analysis.Analyzer{ |
| 162 | Name: "betteralign", |
no outgoing calls