1
0
mirror of https://github.com/DNSCrypt/dnscrypt-proxy.git synced 2024-12-29 00:30:30 +01:00
dnscrypt-proxy/vendor/github.com/BurntSushi/toml/deprecated.go

22 lines
587 B
Go
Raw Normal View History

2021-08-08 10:21:25 +02:00
package toml
import (
"encoding"
"io"
)
2022-01-13 09:22:22 +01:00
// Deprecated: use encoding.TextMarshaler
2021-08-08 10:21:25 +02:00
type TextMarshaler encoding.TextMarshaler
2022-01-13 09:22:22 +01:00
// Deprecated: use encoding.TextUnmarshaler
2021-08-08 10:21:25 +02:00
type TextUnmarshaler encoding.TextUnmarshaler
2022-01-13 09:22:22 +01:00
// Deprecated: use MetaData.PrimitiveDecode.
2021-08-08 10:21:25 +02:00
func PrimitiveDecode(primValue Primitive, v interface{}) error {
2022-01-13 09:22:22 +01:00
md := MetaData{decoded: make(map[string]struct{})}
2021-08-08 10:21:25 +02:00
return md.unify(primValue.undecoded, rvalue(v))
}
2022-01-13 09:22:22 +01:00
// Deprecated: use NewDecoder(reader).Decode(&value).
func DecodeReader(r io.Reader, v interface{}) (MetaData, error) { return NewDecoder(r).Decode(v) }