mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-03 07:06:30 +00:00
c28f7cb29f
Initial part of #435
33 lines
768 B
Go
33 lines
768 B
Go
package toml
|
|
|
|
import (
|
|
"encoding"
|
|
"io"
|
|
)
|
|
|
|
// DEPRECATED!
|
|
//
|
|
// Use the identical encoding.TextMarshaler instead. It is defined here to
|
|
// support Go 1.1 and older.
|
|
type TextMarshaler encoding.TextMarshaler
|
|
|
|
// DEPRECATED!
|
|
//
|
|
// Use the identical encoding.TextUnmarshaler instead. It is defined here to
|
|
// support Go 1.1 and older.
|
|
type TextUnmarshaler encoding.TextUnmarshaler
|
|
|
|
// DEPRECATED!
|
|
//
|
|
// Use MetaData.PrimitiveDecode instead.
|
|
func PrimitiveDecode(primValue Primitive, v interface{}) error {
|
|
md := MetaData{decoded: make(map[string]bool)}
|
|
return md.unify(primValue.undecoded, rvalue(v))
|
|
}
|
|
|
|
// DEPRECATED!
|
|
//
|
|
// Use NewDecoder(reader).Decode(&v) instead.
|
|
func DecodeReader(r io.Reader, v interface{}) (MetaData, error) {
|
|
return NewDecoder(r).Decode(v)
|
|
}
|