codec

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 6 Imported by: 4

Documentation

Overview

Package codec is the codec package for encoding and decoding

Package codec is the codec package for encoding and decoding

Package codec is the codec package for encoding and decoding

Index

Constants

View Source
const (
	ErrUnsupportedDecodeType = errors.StdError("codec: unsupported decode type")
)
View Source
const (
	ErrUnsupportedEncodeType = errors.StdError("codec: unsupported encode type")
)

Variables

This section is empty.

Functions

func DecodeFile

func DecodeFile(name string, obj any) error

DecodeFile Decodes the given file

func DecodeJSONFile

func DecodeJSONFile(name string, obj any) error

DecodeJSONFile Decodes the given JSON file

func DecodeTOMLFile

func DecodeTOMLFile(name string, obj any) error

DecodeTOMLFile Decodes the given TOML file

func DecodeYAMLFile

func DecodeYAMLFile(name string, obj any) error

DecodeYAMLFile Decodes the given YAML file

func EncodeFile

func EncodeFile(name string, obj any) error

EncodeFile Encodes the given file

func EncodeJSONFile

func EncodeJSONFile(name string, obj any) error

EncodeJSONFile Encodes the given JSON file

func EncodeTOMLFile

func EncodeTOMLFile(name string, obj any) error

EncodeTOMLFile Encodes the given TOML file

func EncodeYAMLFile

func EncodeYAMLFile(name string, obj any) error

EncodeYAMLFile Encodes the given YAML file

func MustBytes

func MustBytes(data []byte, err error) []byte

MustBytes returns bytes

func MustString

func MustString(data string, err error) string

MustString returns string

func MustToString

func MustToString(data []byte, err error) string

MustToString returns string

Types

This section is empty.

Directories

Path Synopsis
Package json provides the json functions based on standard library
Package json provides the json functions based on standard library
Package toml provides the toml functions
Package toml provides the toml functions
Package yaml provides the yaml functions
Package yaml provides the yaml functions

Jump to

Keyboard shortcuts

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