summaryrefslogtreecommitdiff
path: root/backend.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-11-30 20:41:00 -0500
committerLuke Shumaker <lukeshu@lukeshu.com>2017-11-30 20:41:00 -0500
commite3b3c08e62f07c75426536c3407dfebc4b71405a (patch)
tree9add249423816b9bc93f40694d921330243d6725 /backend.go
parentdeb826c9c18f26652e565a013e2d00929c0b8a35 (diff)
use github.com/pkg/errors
Diffstat (limited to 'backend.go')
-rw-r--r--backend.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend.go b/backend.go
index 96cdbbf..668e06e 100644
--- a/backend.go
+++ b/backend.go
@@ -2,10 +2,10 @@ package libfastimport
import (
"bufio"
- "fmt"
"io"
"git.lukeshu.com/go/libfastimport/textproto"
+ "github.com/pkg/errors"
)
// A Backend is something that consumes a fast-import stream; the
@@ -64,12 +64,12 @@ func (b *Backend) Do(cmd Cmd) error {
_, b.inCommit = cmd.(CmdCommit)
case cmdClassCommit:
if !b.inCommit {
- panic(fmt.Errorf("Cannot issue commit sub-command outside of a commit: %[1]T(%#[1]v)", cmd))
+ panic(errors.Errorf("Cannot issue commit sub-command outside of a commit: %[1]T(%#[1]v)", cmd))
}
case cmdClassComment:
/* do nothing */
default:
- panic(fmt.Errorf("invalid cmdClass: %d", cmd.fiCmdClass()))
+ panic(errors.Errorf("invalid cmdClass: %d", cmd.fiCmdClass()))
}
err := cmd.fiCmdWrite(b.fastImportWrite)