func (dec *Decoder) Decode(v interface{}) (err error) {
	d := newDecoder(dec.strict)
	defer handleErr(&err)
	node := dec.parser.parse()
	if node == nil {
		return io.EOF
	}
	out := reflect.ValueOf(v)
	if out.Kind() == reflect.Ptr && !out.IsNil() {
		out = out.Elem()
	}
	d.unmarshal(node, out)
	if len(d.terrors) > 0 {
		return &TypeError{d.terrors}
	}
	return nil
}
func (dec *Decoder) Decode(v interface{}) (err error) {
	d := newDecoder(dec.strict)
	defer handleErr(&err)
	node := dec.parser.parse()
	if node == nil {
		return io.EOF
	}
	out := reflect.ValueOf(v)
	if out.Kind() == reflect.Ptr && !out.IsNil() {
		out = out.Elem()
	}
	d.unmarshal(node, out)
	if len(d.terrors) > 0 {
		return &TypeError{d.terrors}
	}
	return nil
}
func ( dec * Decoder ) Decode ( v interface { } ) ( err error ) { d := newDecoder ( dec . strict ) defer handleErr ( & err ) node := dec . parser . parse ( ) if node == nil { return io . EOF } out := reflect . ValueOf ( v ) if out . Kind ( ) == reflect . Ptr && ! out . IsNil ( ) { out = out . Elem ( ) } d . unmarshal ( node , out ) if len ( d . terrors ) > 0 { return & TypeError { d . terrors } } return nil }
// Decode reads the next YAML-encoded value from its input
// and stores it in the value pointed to by v.
//
// See the documentation for Unmarshal for details about the
// conversion of YAML into a Go value.
Decode reads the next YAML - encoded value from its input and stores it in the value pointed to by v . See the documentation for Unmarshal for details about the conversion of YAML into a Go value .