summaryrefslogtreecommitdiff
path: root/cmd_commit.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 /cmd_commit.go
parentdeb826c9c18f26652e565a013e2d00929c0b8a35 (diff)
use github.com/pkg/errors
Diffstat (limited to 'cmd_commit.go')
-rw-r--r--cmd_commit.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd_commit.go b/cmd_commit.go
index 3c2a46e..db22642 100644
--- a/cmd_commit.go
+++ b/cmd_commit.go
@@ -1,9 +1,10 @@
package libfastimport
import (
- "fmt"
"strconv"
"strings"
+
+ "github.com/pkg/errors"
)
// M ///////////////////////////////////////////////////////////////////////////
@@ -28,7 +29,7 @@ func (FileModify) fiCmdRead(fir fiReader) (cmd Cmd, err error) {
str := trimLinePrefix(line, "M ")
fields := strings.SplitN(str, " ", 3)
if len(fields) != 3 {
- return nil, fmt.Errorf("commit: malformed modify command: %v", line)
+ return nil, errors.Errorf("commit: malformed modify command: %v", line)
}
nMode, err := strconv.ParseUint(fields[0], 8, 18)
@@ -168,7 +169,7 @@ func (NoteModify) fiCmdRead(fir fiReader) (cmd Cmd, err error) {
str := trimLinePrefix(line, "N ")
sp := strings.IndexByte(str, ' ')
if sp < 0 {
- return nil, fmt.Errorf("commit: malformed notemodify command: %v", line)
+ return nil, errors.Errorf("commit: malformed notemodify command: %v", line)
}
ref := str[:sp]