aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorAbhinav Gupta <mail@abhinavg.net>2021-12-04 15:16:09 -0800
committerAbhinav Gupta <mail@abhinavg.net>2021-12-04 15:40:53 -0800
commit0dcebfb72bbdaf01554f938402e699d67937c5a0 (patch)
tree512b1d1651109b3008ff610cf2abfa8adc1c211b /remote.go
parente4fcd078d42e945581616855ab78d8b7ed12df6c (diff)
downloadgo-git-0dcebfb72bbdaf01554f938402e699d67937c5a0.tar.gz
error strings: Don't capitalize, use periods, or newlines
Per [Go Code Review Comments][1], > Error strings should not be capitalized (unless beginning with proper > nouns or acronyms) or end with punctuation staticcheck's [ST1005][2] also complains about these. For example, ``` object_walker.go:63:10: error strings should not be capitalized (ST1005) object_walker.go:101:10: error strings should not be capitalized (ST1005) object_walker.go:101:10: error strings should not end with punctuation or a newline (ST1005) plumbing/format/commitgraph/file.go:17:26: error strings should not be capitalized (ST1005) ``` This fixes all instances of this issue reported by staticcheck. [1]: https://github.com/golang/go/wiki/CodeReviewComments#error-strings [2]: https://staticcheck.io/docs/checks/#ST1005
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/remote.go b/remote.go
index 426bde9..dcb24b4 100644
--- a/remote.go
+++ b/remote.go
@@ -260,7 +260,7 @@ func (r *Remote) addReachableTags(localRefs []*plumbing.Reference, remoteRefs st
tagObject, err := object.GetObject(r.s, tag.Hash())
var tagCommit *object.Commit
if err != nil {
- return fmt.Errorf("get tag object: %w\n", err)
+ return fmt.Errorf("get tag object: %w", err)
}
if tagObject.Type() != plumbing.TagObject {
@@ -274,7 +274,7 @@ func (r *Remote) addReachableTags(localRefs []*plumbing.Reference, remoteRefs st
tagCommit, err = object.GetCommit(r.s, annotatedTag.Target)
if err != nil {
- return fmt.Errorf("get annotated tag commit: %w\n", err)
+ return fmt.Errorf("get annotated tag commit: %w", err)
}
// only include tags that are reachable from one of the refs