parseScriptFilter splits a comma-separated GH_ACCEPTANCE_SCRIPT value into individual script names, trimming whitespace and ignoring empty entries.
(raw string)
| 9 | // parseScriptFilter splits a comma-separated GH_ACCEPTANCE_SCRIPT value into |
| 10 | // individual script names, trimming whitespace and ignoring empty entries. |
| 11 | func parseScriptFilter(raw string) []string { |
| 12 | var scripts []string |
| 13 | for s := range strings.SplitSeq(raw, ",") { |
| 14 | if s = strings.TrimSpace(s); s != "" { |
| 15 | scripts = append(scripts, s) |
| 16 | } |
| 17 | } |
| 18 | return scripts |
| 19 | } |
| 20 | |
| 21 | // selectScripts returns the script files under testdata/command that match the |
| 22 | // requested names, and reports whether a filter was applied (i.e. scripts is |
no outgoing calls
no test coverage detected