I think this can be simplified to:
```go
var stdoutBytes, stderrBytes bytes.Buffer
cmd := exec.Command(command, args...)
cmd.Stdout = &stdoutBytes
cmd.Stderr = &stderrBytes
err := cmd.Run()
return stdout.String(), stderr.String(), err
```