toml

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package toml implements a TOML Marshaler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Toml

type Toml struct{}

Toml implements the codecs.Marshaler interface. It can be used to encode/decode toml files, or web requests.

func (*Toml) ContentTypes

func (t *Toml) ContentTypes() []string

ContentTypes returns the content types the marshaller can handle.

func (*Toml) Exts

func (t *Toml) Exts() []string

Exts returns the common file extensions for this encoder.

func (*Toml) Marshal

func (t *Toml) Marshal(v any) ([]byte, error)

Marshal encodes "v" into byte sequence.

func (*Toml) Marshals

func (t *Toml) Marshals(v any) bool

Marshals returns if this codec is able to encode the given type.

func (*Toml) Name

func (t *Toml) Name() string

Name returns the codec name.

func (*Toml) NewDecoder

func (t *Toml) NewDecoder(r io.Reader) codecs.Decoder

NewDecoder returns a Decoder which reads byte sequence from "r".

func (*Toml) NewEncoder

func (t *Toml) NewEncoder(w io.Writer) codecs.Encoder

NewEncoder returns an Encoder which writes bytes sequence into "w".

func (*Toml) Unmarshal

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

Unmarshal decodes "data" into "v". "v" must be a pointer value.

func (*Toml) Unmarshals

func (t *Toml) Unmarshals(v any) bool

Unmarshals returns if this codec is able to decode the given type.

Jump to

Keyboard shortcuts

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