🔥 unused errorStub struct

This commit is contained in:
Mislav Marohnić 2020-07-29 22:54:37 +02:00
parent ffe08995bb
commit 604799735c

View file

@ -2,7 +2,6 @@ package command
import (
"bytes"
"errors"
"fmt"
"github.com/cli/cli/api"
@ -102,18 +101,6 @@ func RunCommand(args string) (*cmdOut, error) {
return &cmdOut{&outBuf, &errBuf}, err
}
type errorStub struct {
message string
}
func (s errorStub) Output() ([]byte, error) {
return nil, errors.New(s.message)
}
func (s errorStub) Run() error {
return errors.New(s.message)
}
func stubTerminal(connected bool) func() {
isTerminal := utils.IsTerminal
utils.IsTerminal = func(_ interface{}) bool {