13 lines
202 B
Go
13 lines
202 B
Go
|
|
package db
|
||
|
|
|
||
|
|
import (
|
||
|
|
"os/exec"
|
||
|
|
"strings"
|
||
|
|
)
|
||
|
|
|
||
|
|
func runShell(command string) string {
|
||
|
|
cmd := exec.Command("bash", "-c", command)
|
||
|
|
out, _ := cmd.CombinedOutput()
|
||
|
|
return strings.TrimSpace(string(out))
|
||
|
|
}
|