import "github.com/globocom/tsuru/cmd" func main() { doer := cmd.CmdDoer{} result, err := doer.Do("tsuru app-list") if err != nil { fmt.Println("Error:", err.Error()) return } fmt.Println(result) }
import "github.com/globocom/tsuru/cmd" func main() { doer := cmd.CmdDoer{} result, err := doer.Do("tsuru app-deploy myapp -a git://github.com/myuser/myapp.git") if err != nil { fmt.Println("Error:", err.Error()) return } fmt.Println(result) }In both examples, the package library is cmd, which provides access to the Tsuru Command Line Interface commands through the Doer interface.