gxc

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fmt

func Fmt(format string, a ...any) io.WriterTo

func P

func P(v any) io.WriterTo

func StringWrapper

func StringWrapper(prefix, postfix string) func(io.WriterTo) io.WriterTo

Types

type Bin

type Bin struct{ V encoding.BinaryMarshaler }

func (Bin) WriteTo

func (b Bin) WriteTo(wr io.Writer) (int64, error)

type Data

type Data []byte

func (Data) WriteTo

func (d Data) WriteTo(wr io.Writer) (res int64, err error)

type EncJSON

type EncJSON struct {
	V              any
	Prefix, Indent string
	EscapeHTML     bool
}

func (EncJSON) WriteTo

func (gj EncJSON) WriteTo(wr io.Writer) (int64, error)

type Error

type Error struct {
	Pos int64
	Err error
}

func (Error) Error

func (e Error) Error() string

type Gen

type Gen func(wr io.Writer) (int64, error)

func (Gen) WriteTo

func (f Gen) WriteTo(wr io.Writer) (int64, error)

type Int

type Int int64

func (Int) WriteTo

func (i Int) WriteTo(wr io.Writer) (int64, error)

type JSON

type JSON struct{ V any }

func (JSON) WriteTo

func (gj JSON) WriteTo(wr io.Writer) (int64, error)

type Message

type Message struct {
	Printer *message.Printer
	Format  string
	Values  []any
}

func Msg

func Msg(pr *message.Printer, fmt string, values ...any) Message

func (Message) WriteTo

func (c Message) WriteTo(wr io.Writer) (int64, error)

type Slice

type Slice struct {
	S   []io.WriterTo
	Sep io.WriterTo
}

func (Slice) WriteTo

func (slc Slice) WriteTo(w io.Writer) (n int64, err error)

type Str

type Str string

func (Str) WriteTo

func (s Str) WriteTo(wr io.Writer) (int64, error)

type Text

type Text struct{ V encoding.TextMarshaler }

func (Text) WriteTo

func (b Text) WriteTo(wr io.Writer) (int64, error)

type Uint

type Uint uint64

func (Uint) WriteTo

func (i Uint) WriteTo(wr io.Writer) (int64, error)

type Wrap

type Wrap struct {
	Content         io.WriterTo
	Prefix, Postfix []byte
}

func WrapString

func WrapString(prefix string, c io.WriterTo, postfix string) Wrap

func (Wrap) WriteTo

func (e Wrap) WriteTo(wr io.Writer) (res int64, err error)

Jump to

Keyboard shortcuts

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