Parse parses a set line. A set line is of the form name1=value1,name2=value2
(s string)
| 61 | // |
| 62 | // A set line is of the form name1=value1,name2=value2 |
| 63 | func Parse(s string) (map[string]interface{}, error) { |
| 64 | vals := map[string]interface{}{} |
| 65 | scanner := bytes.NewBufferString(s) |
| 66 | t := newParser(scanner, vals, false) |
| 67 | err := t.parse() |
| 68 | return vals, err |
| 69 | } |
| 70 | |
| 71 | // ParseString parses a set line and forces a string value. |
| 72 | // |