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
- func DecodeFile(name string, obj any) error
- func DecodeJSONFile(name string, obj any) error
- func DecodeTOMLFile(name string, obj any) error
- func DecodeYAMLFile(name string, obj any) error
- func EncodeFile(name string, obj any) error
- func EncodeJSONFile(name string, obj any) error
- func EncodeTOMLFile(name string, obj any) error
- func EncodeYAMLFile(name string, obj any) error
- func MustBytes(data []byte, err error) []byte
- func MustString(data string, err error) string
- func MustToString(data []byte, err error) string
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 DecodeJSONFile ¶
DecodeJSONFile Decodes the given JSON file
func DecodeTOMLFile ¶
DecodeTOMLFile Decodes the given TOML file
func DecodeYAMLFile ¶
DecodeYAMLFile Decodes the given YAML file
func EncodeJSONFile ¶
EncodeJSONFile Encodes the given JSON file
func EncodeTOMLFile ¶
EncodeTOMLFile Encodes the given TOML file
func EncodeYAMLFile ¶
EncodeYAMLFile Encodes the given YAML file
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 |
Click to show internal directories.
Click to hide internal directories.