You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
408 B

package toml
import (
"io"
"github.com/BurntSushi/toml"
"gitoa.ru/go-4devs/encoding"
)
var (
_ encoding.Decode = Decode
_ encoding.Encode = Encode
)
// Decode from reader to value.
func Decode(r io.Reader, v interface{}) error {
_, err := toml.DecodeReader(r, v)
return err
}
// Encode from value to writer.
func Encode(w io.Writer, v interface{}) error {
return toml.NewEncoder(w).Encode(v)
}