ini

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Codec = codec{}
)

Functions

func Decode

func Decode(data string, v any) error

Decode decodes the given JSON string into v

func Marshal

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

func MarshalToString

func MarshalToString(v any) string

MarshalToString returns json string, and ignores error

func MustToString

func MustToString(v any) string

MustToString returns json string, or panic

func Unmarshal

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

Types

type Decoder

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

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

func (Decoder) Decode

func (d Decoder) Decode(obj any) error

type Encoder

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

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

func (Encoder) Encode

func (e Encoder) Encode(obj any) error

Jump to

Keyboard shortcuts

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