git/gitattr: remove git/gitattr prefix
One error message output by the git/gitattr package currently begins with a "git/gitattr:" prefix, which is unlike other error messages from that package, except for one where the entire message consists of just the package name, and which we will replace in a subsequent commit. We can therefore simplify the message string with the prefix simply removing the prefix. Note that this message is not yet passed as a translation string, but we will address that issue in a subsequent commit.
This commit is contained in:
parent
880eb15b2a
commit
7ed3787d20
@ -83,7 +83,7 @@ func ParseLines(r io.Reader) ([]*Line, string, error) {
|
||||
var err error
|
||||
last := strings.LastIndex(text, "\"")
|
||||
if last == 0 {
|
||||
return nil, "", errors.Errorf("git/gitattr: unbalanced quote: %s", text)
|
||||
return nil, "", errors.Errorf("unbalanced quote: %s", text)
|
||||
}
|
||||
pattern, err = strconv.Unquote(text[:last+1])
|
||||
if err != nil {
|
||||
|
@ -126,7 +126,7 @@ func TestParseLinesUnbalancedQuotes(t *testing.T) {
|
||||
|
||||
assert.Empty(t, lines)
|
||||
assert.EqualError(t, err, fmt.Sprintf(
|
||||
"git/gitattr: unbalanced quote: %s", text))
|
||||
"unbalanced quote: %s", text))
|
||||
}
|
||||
|
||||
func TestParseLinesWithNoAttributes(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user