ldf

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StringUtf16 = ValueType(iota)
	Signed32

	Float
	Double
	Unsigned32

	Bool
	Unsigned64
	Signed64

	StringUtf8
)

Variables

This section is empty.

Functions

func MarshalText

func MarshalText(v any) ([]byte, error)

func MarshalTextLines

func MarshalTextLines(v any) ([]byte, error)

func Unmarshal

func Unmarshal(data []byte, v any) error

Types

type TextDecoder

type TextDecoder struct {
	// contains filtered or unexported fields
}

func NewTextDecoder

func NewTextDecoder(r io.Reader) *TextDecoder

func (*TextDecoder) Decode

func (decoder *TextDecoder) Decode(v any) error

func (*TextDecoder) Err

func (decoder *TextDecoder) Err() error

func (*TextDecoder) Next

func (decoder *TextDecoder) Next() bool

func (*TextDecoder) Token

func (decoder *TextDecoder) Token() (Token, error)

type TextEncoder

type TextEncoder struct {
	// contains filtered or unexported fields
}

func NewTextEncoder

func NewTextEncoder(w io.Writer, delim ...string) *TextEncoder

func (*TextEncoder) Encode

func (encoder *TextEncoder) Encode(v any) error

type Token

type Token struct {
	Name     string
	Type     ValueType
	RawValue string
}

func (*Token) TrimmedValue

func (token *Token) TrimmedValue() string

type TokenError

type TokenError struct {
	Err  error
	Line string
}

func (*TokenError) Error

func (err *TokenError) Error() string

func (*TokenError) Unwrap

func (err *TokenError) Unwrap() error

type Utf16String

type Utf16String []uint16

func StringToUtf16

func StringToUtf16(s string) Utf16String

func (Utf16String) String

func (s Utf16String) String() string

type ValueType

type ValueType int

func (ValueType) String

func (t ValueType) String() string

Jump to

Keyboard shortcuts

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