Versions in this module Expand all Collapse all v1 v1.0.0 Nov 13, 2022 Changes in this version + const RFC3339NanoFixed + func DisplayJSONMessagesStream(in io.Reader, out io.Writer, terminalFd uintptr, isTerminal bool, ...) error + func DisplayJSONMessagesToStream(in io.Reader, stream stream, auxCallback func(JSONMessage)) error + func FormatError(err error) []byte + func FormatStatus(id, format string, a ...interface{}) []byte + func Message(out Output, id, message string) + func Messagef(out Output, id, format string, a ...interface{}) + func Update(out Output, id, action string) + func Updatef(out Output, id, format string, a ...interface{}) + type JSONError struct + Code int + Message string + func (e *JSONError) Error() string + type JSONMessage struct + Aux *json.RawMessage + Error *JSONError + ErrorMessage string + From string + ID string + Progress *JSONProgress + ProgressMessage string + Status string + Stream string + Time int64 + TimeNano int64 + func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error + type JSONProgress struct + Current int64 + HideCounts bool + Start int64 + Total int64 + Units string + func (p *JSONProgress) String() string + type Out struct + func NewOut(out io.Writer) *Out + func (o *Out) GetTtySize() (uint, uint) + func (o *Out) SetRawTerminal() (err error) + func (o *Out) Write(p []byte) (int, error) + func (s *Out) FD() uintptr + func (s *Out) IsTerminal() bool + func (s *Out) RestoreTerminal() + func (s *Out) SetIsTerminal(isTerminal bool) + type Output interface + WriteProgress func(Progress) error + func ChanOutput(progressChan chan<- Progress) Output + func NewJSONProgressOutput(out io.Writer, newLines bool) Output + func NewProgressOutput(out io.Writer) Output + type Progress struct + Action string + Aux interface{} + Current int64 + HideCounts bool + ID string + LastUpdate bool + Message string + Total int64 + Units string + type Reader struct + func NewProgressReader(in io.ReadCloser, out Output, size int64, id, action string) *Reader + func (p *Reader) Close() error + func (p *Reader) Read(buf []byte) (n int, err error)