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.

22 lines
405 B

package toml
import (
"io"
"github.com/BurntSushi/toml"
"gitoa.ru/go-4devs/encoding"
)
var _ encoding.Decode = Decode
var _ 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)
}