Documentation
¶
Index ¶
- Constants
- func MakeBoxStringEncoder(truncate CliFormatTruncation, co ColorOptions) *boxStringEncoder
- func MakeBracketWrapped[T any](sfw interfaces.StringEncoderTo[T]) interfaces.StringEncoderTo[T]
- func MakeColor[T any](o ColorOptions, fsw interfaces.StringEncoderTo[T], c fields.Type) interfaces.StringEncoderTo[T]
- func MakeDefaultDatePrefixFormatWriter[T any](clock Clock, f interfaces.StringEncoderTo[T]) interfaces.StringEncoderTo[T]
- func MakeDelim[T any](delim string, w1 interfaces.WriterAndStringWriter, ...) func(T) error
- func MakeFunc[T any](f interfaces.FuncStringWriterFormat[T]) interfaces.StringEncoderTo[T]
- func MakeIndentedHeader(o ColorOptions) interfaces.StringEncoderTo[string]
- func MakeQuotedString[T ~string]() interfaces.StringEncoderTo[T]
- func MakeRightAligned() interfaces.StringEncoderTo[string]
- func MakeString[T ~string]() interfaces.StringEncoderTo[T]
- func StringPrefixFromOptions(options options_print.Options) string
- func WriteStringPrefixFormat(w interfaces.WriterAndStringWriter, prefix, body string) (n int64, err error)
- type Box
- type BoxHeader
- type CliFormatTruncation
- type Clock
- type ColorOptions
- type Date
- type FormattedField
- type HeaderWriter
- type OutputOptions
Constants ¶
View Source
const ( StringDRArrow = "↳" StringNew = "new" StringSame = "same" StringChanged = "changed" StringDeleted = "deleted" StringUpdated = "updated" StringArchived = "archived" StringInternal = "internal" StringUnchanged = "unchanged" StringUntracked = "untracked" StringConflicted = "conflicted" StringRecognized = "recognized" StringCheckedOut = "checked out" StringBlobMissing = "blob missing" StringWouldDelete = "would delete" StringUnrecognized = "unrecognized" StringFormatDateTime = "06-01-02 15:04:05" StringIndent = " " StringIndentWithSpace = " " LenStringMax = len(StringIndent) // TODO-P4 use reflection? )
View Source
const ( CliFormatTruncationNone = CliFormatTruncation(iota) CliFormatTruncation66CharEllipsis )
Variables ¶
This section is empty.
Functions ¶
func MakeBoxStringEncoder ¶
func MakeBoxStringEncoder( truncate CliFormatTruncation, co ColorOptions, ) *boxStringEncoder
func MakeBracketWrapped ¶
func MakeBracketWrapped[T any]( sfw interfaces.StringEncoderTo[T], ) interfaces.StringEncoderTo[T]
func MakeColor ¶
func MakeColor[T any]( o ColorOptions, fsw interfaces.StringEncoderTo[T], c fields.Type, ) interfaces.StringEncoderTo[T]
func MakeDefaultDatePrefixFormatWriter ¶
func MakeDefaultDatePrefixFormatWriter[T any]( clock Clock, f interfaces.StringEncoderTo[T], ) interfaces.StringEncoderTo[T]
func MakeDelim ¶
func MakeDelim[T any]( delim string, w1 interfaces.WriterAndStringWriter, f interfaces.StringEncoderTo[T], ) func(T) error
func MakeFunc ¶
func MakeFunc[T any]( f interfaces.FuncStringWriterFormat[T], ) interfaces.StringEncoderTo[T]
func MakeIndentedHeader ¶
func MakeIndentedHeader( o ColorOptions, ) interfaces.StringEncoderTo[string]
func MakeQuotedString ¶
func MakeQuotedString[T ~string]() interfaces.StringEncoderTo[T]
func MakeRightAligned ¶
func MakeRightAligned() interfaces.StringEncoderTo[string]
func MakeString ¶
func MakeString[T ~string]() interfaces.StringEncoderTo[T]
func StringPrefixFromOptions ¶
func StringPrefixFromOptions( options options_print.Options, ) string
func WriteStringPrefixFormat ¶
func WriteStringPrefixFormat( w interfaces.WriterAndStringWriter, prefix, body string, ) (n int64, err error)
Types ¶
type Box ¶
type Box struct {
Header BoxHeader
Contents collections_slice.Slice[FormattedField]
Trailer collections_slice.Slice[FormattedField]
EachFieldOnANewline bool
IdFieldsSeparatedByLines bool
}
type ColorOptions ¶
type ColorOptions struct {
OffEntirely bool
}
func (ColorOptions) SetOffEntirely ¶
func (co ColorOptions) SetOffEntirely(v bool) ColorOptions
type Date ¶
type Date[T any] struct { Clock Format string interfaces.StringEncoderTo[T] }
func (*Date[T]) EncodeStringTo ¶
func (f *Date[T]) EncodeStringTo( e T, w interfaces.WriterAndStringWriter, ) (n int64, err error)
type FormattedField ¶
type OutputOptions ¶
type OutputOptions struct {
ColorOptionsOut ColorOptions
ColorOptionsErr ColorOptions
}
Source Files
¶
- bracket_wrapped.go
- color.go
- date.go
- delim.go
- fields_writer.go
- func.go
- indented_header.go
- main.go
- options.go
- prefix.go
- quoted_string.go
- right_aligned.go
- string.go
- truncate_options.go
Click to show internal directories.
Click to hide internal directories.