func runcmd(name string, args ...string) ([]byte, []byte, error) {
	var sb strings.Builder
	sb.WriteString(name)
	sb.WriteString(" ")
	for i, arg := range args {
		if i != 0 {
			sb.WriteString(" ")
		}
		sb.WriteString(arg)
	}

	log.Debugln(fmt.Sprintf("running cmd: `%s`", sb.String()))
	var outbuf, errbuf bytes.Buffer
	cmd := exec.Command(name, args...)
	cmd.Stdout = &outbuf
	cmd.Stderr = &errbuf

	if err := cmd.Run(); err != nil {
		return outbuf.Bytes(), errbuf.Bytes(), err
	}

	return outbuf.Bytes(), errbuf.Bytes(), nil
}
// runcmd executes a command and returns the stdout, stderr and an eventual
// error
runcmd executes a command and returns the stdout, stderr and an eventual
error
// runcmd executes a command and returns the stdout stderr and an eventual // error
func runcmd(name string, args ...string) ([]byte, []byte, error) {
	var sb strings.Builder
	sb.WriteString(name)
	sb.WriteString(" ")
	for i, arg := range args {
		if i != 0 {
			sb.WriteString(" ")
		}
		sb.WriteString(arg)
	}
	log.Debugln(fmt.Sprintf("running cmd: `%s`", sb.String()))
	var outbuf, errbuf bytes.Buffer
	cmd := exec.Command(name, args...)
	cmd.Stdout = &outbuf
	cmd.Stderr = &errbuf
	if err := cmd.Run(); err != nil {
		return outbuf.Bytes(), errbuf.Bytes(), err
	}
	return outbuf.Bytes(), errbuf.Bytes(), nil
}
func runcmd ( name string , args ... string ) ( [ ] byte , [ ] byte , error ) { var sb strings . Builder sb . WriteString ( name ) sb . WriteString ( " " ) for i , arg := range args { if i != 0 { sb . WriteString ( " " ) } sb . WriteString ( arg ) } log . Debugln ( fmt . Sprintf ( " " , sb . String ( ) ) ) var outbuf , errbuf bytes . Buffer cmd := exec . Command ( name , args ... ) cmd . Stdout = & outbuf cmd . Stderr = & errbuf if err := cmd . Run ( ) ; err != nil { return outbuf . Bytes ( ) , errbuf . Bytes ( ) , err } return outbuf . Bytes ( ) , errbuf . Bytes ( ) , nil }
runcmd executes a command and returns the stdout, stderr and an eventual
error
runcmd executes a command and returns the stdout stderr and an eventual error