mirror of
https://github.com/Jguer/yay.git
synced 2024-11-07 09:37:22 +01:00
21 lines
336 B
Go
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
|
|
}
|