feat: port user commands from influxdb (#99)

This commit is contained in:
Daniel Moran
2021-05-20 13:24:13 -04:00
committed by GitHub
parent e4af676ae5
commit 60dd8b54b5
30 changed files with 1960 additions and 80 deletions

View File

@ -28,6 +28,11 @@ func (t *terminalStdio) Write(p []byte) (int, error) {
return t.Stdout.Write(p)
}
// WriteErr prints some bytes to stderr.
func (t *terminalStdio) WriteErr(p []byte) (int, error) {
return t.Stderr.Write(p)
}
type bannerTemplateData struct {
Message string
}

View File

@ -4,6 +4,7 @@ import "io"
type StdIO interface {
io.Writer
WriteErr(p []byte) (n int, err error)
Banner(message string) error
Error(message string) error
GetStringInput(prompt, defaultValue string) (string, error)