encoding

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEncoderNotFound = errors.New("encoder not found for config file format")
	ErrDecoderNotFound = errors.New("decoder not found for config file format")
)

Functions

func Decode

func Decode(format string, b []byte, v interface{}) error

Decode decodes the value with specified format

func Encode

func Encode(format string, v interface{}) ([]byte, error)

Encode encodes the value with specified format

Types

type Decoder

type Decoder interface {
	Decode(b []byte, v interface{}) error
}

type Encoder

type Encoder interface {
	Encode(v interface{}) ([]byte, error)
}

Jump to

Keyboard shortcuts

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