RunCommand returns io.ReadCloser instead

This commit is contained in:
diamondburned (Forefront) 2020-05-19 20:35:00 -07:00
parent 1b5f2712b6
commit c3c545ce14
1 changed files with 3 additions and 2 deletions

View File

@ -70,8 +70,9 @@ type AuthenticateEntry struct {
// this extends the entire service.
type Commander interface {
// RunCommand executes the given command, with the slice being already split
// arguments, similar to os.Args.
RunCommand([]string) (io.Reader, error)
// arguments, similar to os.Args. The function could return an output
// stream, in which the frontend must display it live and close it on EOF.
RunCommand([]string) (io.ReadCloser, error)
}
// CommandCompleter is an optional interface that a backend could implement for