aboutsummaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorAbhinav Gupta <mail@abhinavg.net>2021-11-27 14:26:38 -0800
committerAbhinav Gupta <mail@abhinavg.net>2021-11-27 16:39:09 -0800
commit07a8bcc71afb5814c00c7a7b19c29b0c493a18fd (patch)
treee57ec50bc3e51cea46fc589c4a3cd0586869a2aa /storage
parente4fcd078d42e945581616855ab78d8b7ed12df6c (diff)
downloadgo-git-07a8bcc71afb5814c00c7a7b19c29b0c493a18fd.tar.gz
Remove unused variables/types/functions
[staticcheck](https://staticcheck.io/) reported a number of unused fields, functions, types, and variables across the code. Where possible, use them (assert unchecked errors in tests, for example) and otherwise remove them.
Diffstat (limited to 'storage')
-rw-r--r--storage/filesystem/dotgit/dotgit_test.go2
-rw-r--r--storage/filesystem/object_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/storage/filesystem/dotgit/dotgit_test.go b/storage/filesystem/dotgit/dotgit_test.go
index 4c2ae94..1db1a04 100644
--- a/storage/filesystem/dotgit/dotgit_test.go
+++ b/storage/filesystem/dotgit/dotgit_test.go
@@ -653,7 +653,7 @@ func (s *SuiteDotGit) TestObject(c *C) {
fs.MkdirAll(incomingDirPath, os.FileMode(0755))
fs.Create(incomingFilePath)
- file, err = dir.Object(plumbing.NewHash(incomingHash))
+ _, err = dir.Object(plumbing.NewHash(incomingHash))
c.Assert(err, IsNil)
}
diff --git a/storage/filesystem/object_test.go b/storage/filesystem/object_test.go
index 59b40d3..9c5e31f 100644
--- a/storage/filesystem/object_test.go
+++ b/storage/filesystem/object_test.go
@@ -386,7 +386,7 @@ func (s *FsSuite) TestGetFromObjectFileSharedCache(c *C) {
c.Assert(err, IsNil)
c.Assert(obj.Hash(), Equals, expected)
- obj, err = o2.EncodedObject(plumbing.CommitObject, expected)
+ _, err = o2.EncodedObject(plumbing.CommitObject, expected)
c.Assert(err, Equals, plumbing.ErrObjectNotFound)
}