diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2021-05-01 02:35:29 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2021-05-01 02:35:29 -0600 |
commit | 554090886c69cba9b3389d3ee86f61292aafaed1 (patch) | |
tree | c760fe48a96a243a3216f251ec815c2ab43a9ffb /util.go | |
parent | 5f64323918520e048cc02eb522aeaf7f814d611b (diff) |
improve error messages
Diffstat (limited to 'util.go')
-rw-r--r-- | util.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -35,12 +35,12 @@ func trimLinePrefix(line string, prefix string) string { func parse_data(line string) (data string, err error) { nl := strings.IndexByte(line, '\n') if nl < 0 { - return "", errors.Errorf("data: expected newline: %q", data) + return "", errors.Errorf("data: expected newline: %q", line) } head := line[:nl+1] rest := line[nl+1:] if !strings.HasPrefix(head, "data ") { - return "", errors.Errorf("data: could not parse: %q", data) + return "", errors.Errorf("data: could not parse: %q", line) } if strings.HasPrefix(head, "data <<") { // Delimited format |