Documentation
¶
Index ¶
- Variables
- func AssumeStringer(w io.Writer, val any) error
- func FormatVal(w io.Writer, c WriteInto, val any, sep []byte) error
- func FormatVals(w io.Writer, c WriteInto, vals []any, sep *string) error
- func GetAnyTypes(vals []any) []reflect.Type
- func TryConvert(w io.Writer, val any) error
- type AnyFormatter
- type AnySliceSorter
- type AnyToBytes
- type AnyToFormatter
- type AnyToString
- type Config
- type Empty
- type ErrDuplicateType
- type ErrNoIndexForType
- type ErrNoMatch
- type ErrNoStringer
- type ErrNotConvertable
- type Formattable
- type Separator
- type SprintfTemplate
- type String
- type StringGenerator
- type TypeOrder
- type TypeSet
- type TypeSorter
- type TypeToFormatter
- type TypeToIndex
- type TypesMeta
- type WriteInto
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNilString = fmt.Errorf("expected no nil string")
Functions ¶
func GetAnyTypes ¶
Types ¶
type AnySliceSorter ¶
type AnySliceSorter struct { TypeToIndex TypeToIndex Vals []any Types []reflect.Type }
func (*AnySliceSorter) Less ¶
func (a *AnySliceSorter) Less(i, j int) bool
Less is part of sort.Interface.
func (*AnySliceSorter) Swap ¶
func (a *AnySliceSorter) Swap(i, j int)
Swap is part of sort.Interface.
type AnyToBytes ¶
type AnyToBytes struct {
// contains filtered or unexported fields
}
type AnyToFormatter ¶
func (AnyToFormatter) ToWriter ¶
func (a AnyToFormatter) ToWriter() TypeToFormatter
type AnyToString ¶
func (AnyToString) ToWriter ¶
func (a AnyToString) ToWriter() AnyToBytes
type Config ¶
func (Config) BuildGenerator ¶
func (cfg Config) BuildGenerator(order TypeOrder) (StringGenerator, error)
type ErrDuplicateType ¶
func (*ErrDuplicateType) Error ¶
func (err *ErrDuplicateType) Error() string
type ErrNoIndexForType ¶
type ErrNoIndexForType struct {
Val any
}
func (*ErrNoIndexForType) Error ¶
func (err *ErrNoIndexForType) Error() string
type ErrNoMatch ¶
type ErrNoMatch struct {
Val any
}
func (*ErrNoMatch) Error ¶
func (err *ErrNoMatch) Error() string
type ErrNoStringer ¶
func (*ErrNoStringer) Error ¶
func (err *ErrNoStringer) Error() string
type ErrNotConvertable ¶
func (*ErrNotConvertable) Error ¶
func (err *ErrNotConvertable) Error() string
type Formattable ¶
type SprintfTemplate ¶
type SprintfTemplate string
type StringGenerator ¶
type StringGenerator struct {
// contains filtered or unexported fields
}
type TypeSorter ¶
type TypeSorter struct {
// contains filtered or unexported fields
}
type TypeToFormatter ¶
type TypeToIndex ¶
type TypesMeta ¶
type TypesMeta struct { Set TypeSet TypeToIndex TypeToIndex }
func (TypesMeta) MakeSorter ¶
func (tm TypesMeta) MakeSorter(vals []any) (AnySliceSorter, error)
func (TypesMeta) SortAnySlice ¶
Click to show internal directories.
Click to hide internal directories.