aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/BurntSushi/toml/deprecated.go
blob: c6af3f239ddf273516d954278d57dfe44a032965 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package toml

import (
	"encoding"
	"io"
)

// Deprecated: use encoding.TextMarshaler
type TextMarshaler encoding.TextMarshaler

// Deprecated: use encoding.TextUnmarshaler
type TextUnmarshaler encoding.TextUnmarshaler

// Deprecated: use MetaData.PrimitiveDecode.
func PrimitiveDecode(primValue Primitive, v interface{}) error {
	md := MetaData{decoded: make(map[string]struct{})}
	return md.unify(primValue.undecoded, rvalue(v))
}

// Deprecated: use NewDecoder(reader).Decode(&value).
func DecodeReader(r io.Reader, v interface{}) (MetaData, error) { return NewDecoder(r).Decode(v) }