|
|
@ -26,6 +26,9 @@ import (
|
|
|
|
"github.com/ghodss/yaml"
|
|
|
|
"github.com/ghodss/yaml"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ErrNotList indicates that a non-list was treated as a list.
|
|
|
|
|
|
|
|
var ErrNotList = errors.New("not a list")
|
|
|
|
|
|
|
|
|
|
|
|
// ToYAML takes a string of arguments and converts to a YAML document.
|
|
|
|
// ToYAML takes a string of arguments and converts to a YAML document.
|
|
|
|
func ToYAML(s string) (string, error) {
|
|
|
|
func ToYAML(s string) (string, error) {
|
|
|
|
m, err := Parse(s)
|
|
|
|
m, err := Parse(s)
|
|
|
@ -156,8 +159,6 @@ func (t *parser) val() ([]rune, error) {
|
|
|
|
return v, err
|
|
|
|
return v, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var ErrNotList = errors.New("not a list")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (t *parser) valList() ([]interface{}, error) {
|
|
|
|
func (t *parser) valList() ([]interface{}, error) {
|
|
|
|
|
|
|
|
|
|
|
|
r, _, e := t.sc.ReadRune()
|
|
|
|
r, _, e := t.sc.ReadRune()
|
|
|
|