From e3b3c08e62f07c75426536c3407dfebc4b71405a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 30 Nov 2017 20:41:00 -0500 Subject: use github.com/pkg/errors --- backend.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backend.go') 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) -- cgit v1.2.3