git.sr.ht/~pingoo/stdx@v0.0.0-20240218134121-094174641f6e/toml/deprecated.go (about)

     1  package toml
     2  
     3  import (
     4  	"encoding"
     5  	"io"
     6  )
     7  
     8  // Deprecated: use encoding.TextMarshaler
     9  type TextMarshaler encoding.TextMarshaler
    10  
    11  // Deprecated: use encoding.TextUnmarshaler
    12  type TextUnmarshaler encoding.TextUnmarshaler
    13  
    14  // Deprecated: use MetaData.PrimitiveDecode.
    15  func PrimitiveDecode(primValue Primitive, v interface{}) error {
    16  	md := MetaData{decoded: make(map[string]struct{})}
    17  	return md.unify(primValue.undecoded, rvalue(v))
    18  }
    19  
    20  // Deprecated: use NewDecoder(reader).Decode(&value).
    21  func DecodeReader(r io.Reader, v interface{}) (MetaData, error) { return NewDecoder(r).Decode(v) }