Documentation
¶
Index ¶
- Variables
- func GetBuildInfo() []byte
- func PointerTo[T any](t T) *T
- type Color
- type ErrRequestTimedOut
- type Format
- type HTTPVersion
- type Handle
- type KeyVal
- type Printer
- func (p *Printer) Bytes() []byte
- func (p *Printer) Flush() error
- func (p *Printer) Read(b []byte) (int, error)
- func (p *Printer) Reset()
- func (p *Printer) Set(s Sequence)
- func (p *Printer) Write(b []byte) (int, error)
- func (p *Printer) WriteRune(r rune) (int, error)
- func (p *Printer) WriteString(s string) (int, error)
- func (p *Printer) WriteTo(w io.Writer) (int64, error)
- type PrinterTo
- type Sequence
- type SignalError
- type ValueError
- type Verbosity
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IsStderrTerm bool IsStdoutTerm bool UserAgent string Version string )
Functions ¶
func GetBuildInfo ¶
func GetBuildInfo() []byte
GetBuildInfo returns the JSON encoded build information for the executable.
Types ¶
type ErrRequestTimedOut ¶
ErrRequestTimedOut represents the error when the request times out.
func (ErrRequestTimedOut) Error ¶
func (err ErrRequestTimedOut) Error() string
type HTTPVersion ¶
type HTTPVersion int
HTTPVersion represents the options for the maximum allowed HTTP version.
const ( HTTPDefault HTTPVersion = iota HTTP1 HTTP2 )
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
Handle represents a handle for stderr and stdout Printers.
type KeyVal ¶
type KeyVal struct {
Key, Val string
}
KeyVal represents a generic key & value struct.
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer allows for writing data with optional ANSI escape sequences based on the color settings for a target.
func (*Printer) WriteString ¶
WriteString writes the provided string to the buffer.
type PrinterTo ¶
type PrinterTo interface {
PrintTo(*Printer)
}
PrinterTo represents the interface for printing to a Printer.
type SignalError ¶
type SignalError string
SignalError represents the error when a signal is caught.
func (SignalError) Error ¶
func (err SignalError) Error() string
type ValueError ¶
type ValueError struct {
// contains filtered or unexported fields
}
func NewValueError ¶
func NewValueError(option, value, usage string, isFile bool) *ValueError
func (*ValueError) Error ¶
func (err *ValueError) Error() string
func (*ValueError) PrintTo ¶
func (err *ValueError) PrintTo(p *Printer)
Click to show internal directories.
Click to hide internal directories.