string_format_writer

package
v0.0.0-...-381c4e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StringDRArrow        = "↳"
	StringNew            = "new"
	StringSame           = "same"
	StringChanged        = "changed"
	StringDeleted        = "deleted"
	StringUpdated        = "updated"
	StringArchived       = "archived"
	StringUnchanged      = "unchanged"
	StringUntracked      = "untracked"
	StringConflicted     = "conflicted"
	StringRecognized     = "recognized"
	StringCheckedOut     = "checked out"
	StringAkteMissing    = "akte missing"
	StringWouldDelete    = "would delete"
	StringUnrecognized   = "unrecognized"
	StringFormatDateTime = "06-01-02 15:04:05"
	StringIndent         = "                 "
	LenStringMax         = len(StringIndent) // TODO-P4 use reflection?

	ColorTypePointer    = colorBlue
	ColorTypeConstant   = colorItalic
	ColorTypeType       = colorYellow
	ColorTypeIdentifier = colorCyan
	ColorTypeTitle      = colorRed
)

Variables

This section is empty.

Functions

func MakeBracketWrapped

func MakeBracketWrapped[T any](
	sfw schnittstellen.StringFormatWriter[T],
) schnittstellen.StringFormatWriter[T]

func MakeColor

func MakeDefaultDatePrefixFormatWriter

func MakeDefaultDatePrefixFormatWriter[T any](
	clock Clock,
	f schnittstellen.StringFormatWriter[T],
) schnittstellen.StringFormatWriter[T]

func MakeDelim

func MakeDelim[T any](
	delim string,
	w1 schnittstellen.WriterAndStringWriter,
	f schnittstellen.StringFormatWriter[T],
) func(T) error

func MakeFunc

func MakeIndentedHeader

func MakeIndentedHeader(
	o ColorOptions,
) schnittstellen.StringFormatWriter[string]

func MakeQuotedString

func MakeQuotedString[T ~string]() schnittstellen.StringFormatWriter[T]

func MakeRightAligned

func MakeRightAligned() schnittstellen.StringFormatWriter[string]

func MakeString

func MakeString[T ~string]() schnittstellen.StringFormatWriter[T]

func StringPrefixFromOptions

func StringPrefixFromOptions(
	options erworben_cli_print_options.PrintOptions,
) string

func WriteStringPrefixFormat

func WriteStringPrefixFormat(
	w schnittstellen.WriterAndStringWriter,
	prefix, body string,
) (n int64, err error)

Types

type Clock

type Clock interface {
	GetTime() time.Time
}

type ColorOptions

type ColorOptions struct {
	OffEntirely bool
}

type ColorType

type ColorType string

type Date

type Date[T any] struct {
	Clock
	Format string
	schnittstellen.StringFormatWriter[T]
}

func (*Date[T]) WriteStringFormat

func (f *Date[T]) WriteStringFormat(
	w schnittstellen.WriterAndStringWriter,
	e T,
) (n int64, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL