yay/vendor/github.com/Morganamilo/go-pacmanconf/cmd.go
2018-09-10 23:07:34 +01:00

21 lines
336 B
Go

package pacmanconf
import (
"bytes"
"os/exec"
)
func pacmanconf(args []string) (string, string, error) {
var outbuf, errbuf bytes.Buffer
cmd := exec.Command("pacman-conf", args...)
cmd.Stdout = &outbuf
cmd.Stderr = &errbuf
err := cmd.Run()
stdout := outbuf.String()
stderr := errbuf.String()
return stdout, stderr, err
}