-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
Hello!
i tried use this:
package main
import (
"github.com/codeskyblue/go-sh"
"log"
"fmt"
)
func main() {
port := uint(1)
session := sh.NewSession()
session.ShowCMD = true
out, err := session.Command("/Users/Ivan/Downloads/redis-3.2.3/src/redis-server", "--port", port).Output()
if err != nil {
log.Fatal("ERROR: ", err)
}
fmt.Println("output is", string(out))
}
And have result:
/usr/local/go/bin/go run /Users/Ivan/Documents/GolangSpace/src/examples/test.go
[golang-sh]$ /Users/Ivan/Downloads/redis-3.2.3/src/redis-server --port
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 2
>>> 'port'
Bad directive or wrong number of arguments
2016/09/09 15:55:25 ERROR: exit status 1
exit status 1
Metadata
Metadata
Assignees
Labels
No labels