diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-30 20:41:00 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-30 20:41:00 -0500 |
commit | e3b3c08e62f07c75426536c3407dfebc4b71405a (patch) | |
tree | 9add249423816b9bc93f40694d921330243d6725 /backend.go | |
parent | deb826c9c18f26652e565a013e2d00929c0b8a35 (diff) |
use github.com/pkg/errors
Diffstat (limited to 'backend.go')
-rw-r--r-- | backend.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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) |