Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Environment ¶
Environment Binder may be used to automatic bound to OS streams
and working directory.
func run(args []string, stdin io.Reader, stdout, stderr io.Writer) { env := &Environment{ Stdin: stdin, Stdout: stdout, Stderr: stderr, } root := Attach( &RootCmd{}, []Binder{env}, Attach(&MyCommand{Environment: env}, nil), ) root.SetArgs(args) err = root.Execute() }
func (*Environment) Bind ¶
func (e *Environment) Bind(cc *cobra.Command)
Click to show internal directories.
Click to hide internal directories.