migrate to go-modules

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2019-06-24 11:29:13 +02:00
parent a3211b73c6
commit d697456dc9
1000 changed files with 97470 additions and 48284 deletions

22
vendor/github.com/mattn/go-shellwords/util_posix.go generated vendored Normal file
View File

@ -0,0 +1,22 @@
// +build !windows,go1.6
package shellwords
import (
"errors"
"os"
"os/exec"
"strings"
)
func shellRun(line string) (string, error) {
shell := os.Getenv("SHELL")
b, err := exec.Command(shell, "-c", line).Output()
if err != nil {
if eerr, ok := err.(*exec.ExitError); ok {
b = eerr.Stderr
}
return "", errors.New(err.Error() + ":" + string(b))
}
return strings.TrimSpace(string(b)), nil
}