blob: f69de02ee8e965f1533161c104a5490905f6511e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package sh
// Implementations must not retain p.
type Writer interface {
Write(p []byte) (n int, err error)
}
// Implementations must not retain p.
type Argv interface {
InitIO(out io.Writer, err io.Writer)
InitPB(pb *argvpb.Argv)
WriteOUT(bytes []byte)
WriteERR(bytes []byte)
Stdout(out io.Writer)
Stderr(err io.Writer)
Match() (matches []string, err error)
Help() (help string, err error)
Exit(s string, err error)
}
// Implementations must not retain p.
type Command interface {
Run(pb *shpb.Command)
Start(pb *shpb.Command)
Exit(pb *shpb.Command)
}
|