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

30 lines
837 B
Go
Raw Normal View History

2021-08-08 10:21:25 +02:00
package toml
import (
"encoding"
"io"
)
2023-06-01 11:32:10 +02:00
// TextMarshaler is an alias for encoding.TextMarshaler.
//
2022-01-13 09:22:22 +01:00
// Deprecated: use encoding.TextMarshaler
2021-08-08 10:21:25 +02:00
type TextMarshaler encoding.TextMarshaler
2023-06-01 11:32:10 +02:00
// TextUnmarshaler is an alias for encoding.TextUnmarshaler.
//
2022-01-13 09:22:22 +01:00
// Deprecated: use encoding.TextUnmarshaler
2021-08-08 10:21:25 +02:00
type TextUnmarshaler encoding.TextUnmarshaler
2023-06-01 11:32:10 +02:00
// PrimitiveDecode is an alias for MetaData.PrimitiveDecode().
//
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))
}
2023-06-01 11:32:10 +02:00
// DecodeReader is an alias for NewDecoder(r).Decode(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) }