Skip to content

Dont support uint in arguments #19

@MeGaPk

Description

@MeGaPk

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions