summaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'util.go')
-rw-r--r--util.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.go b/util.go
index 544818e..d041168 100644
--- a/util.go
+++ b/util.go
@@ -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