rename strArr to split

This commit is contained in:
Dan Anglin 2024-06-09 14:10:39 +01:00
parent 0ce8614729
commit cad02f7b66
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638

View file

@ -22,14 +22,14 @@ func Display(displayer Displayer, noColor bool, pagerCommand string) {
return
}
strArr := strings.Split(pagerCommand, " ")
split := strings.Split(pagerCommand, " ")
pager := new(exec.Cmd)
if len(strArr) == 1 {
pager = exec.Command(strArr[0]) //nolint:gosec
if len(split) == 1 {
pager = exec.Command(split[0]) //nolint:gosec
} else {
pager = exec.Command(strArr[0], strArr[1:]...) //nolint:gosec
pager = exec.Command(split[0], split[1:]...) //nolint:gosec
}
pipe, err := pager.StdinPipe()