aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml11
-rw-r--r--examples/fs_implementation/main.go6
-rw-r--r--examples/storage/aerospike/storage.go4
-rw-r--r--storage/filesystem/internal/dotgit/dotgit.go4
-rw-r--r--utils/fs/os_test.go4
5 files changed, 14 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml
index 043d7da..df830f0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,17 +1,6 @@
language: go
-go:
-- 1.6
-- 1.7
-- tip
-matrix:
- allow_failures:
- - go: tip
-
-
-language: go
go:
- - 1.6
- 1.7
- tip
diff --git a/examples/fs_implementation/main.go b/examples/fs_implementation/main.go
index 69ee0a0..e5d2851 100644
--- a/examples/fs_implementation/main.go
+++ b/examples/fs_implementation/main.go
@@ -1,5 +1,11 @@
package main
+import "fmt"
+
+func main() {
+ fmt.Println("example to be fixed")
+}
+
/*
import (
"fmt"
diff --git a/examples/storage/aerospike/storage.go b/examples/storage/aerospike/storage.go
index a62d1dc..a9312ce 100644
--- a/examples/storage/aerospike/storage.go
+++ b/examples/storage/aerospike/storage.go
@@ -144,6 +144,10 @@ type TxObjectStorage struct {
Storage *ObjectStorage
}
+func (tx *TxObjectStorage) Get(t core.ObjectType, h core.Hash) (core.Object, error) {
+ return tx.Storage.Get(t, h)
+}
+
func (tx *TxObjectStorage) Set(obj core.Object) (core.Hash, error) {
return tx.Storage.Set(obj)
}
diff --git a/storage/filesystem/internal/dotgit/dotgit.go b/storage/filesystem/internal/dotgit/dotgit.go
index 54113d5..c4392a2 100644
--- a/storage/filesystem/internal/dotgit/dotgit.go
+++ b/storage/filesystem/internal/dotgit/dotgit.go
@@ -299,14 +299,14 @@ func (w *PackWriter) Close() error {
}()
pipe := []func() error{
+ w.synced.Close,
func() error { return <-w.result },
w.fr.Close,
w.fw.Close,
- w.synced.Close,
w.save,
}
- for i, f := range pipe {
+ for _, f := range pipe {
if err := f(); err != nil {
return err
}
diff --git a/utils/fs/os_test.go b/utils/fs/os_test.go
index acc6bdd..a040ddf 100644
--- a/utils/fs/os_test.go
+++ b/utils/fs/os_test.go
@@ -20,7 +20,7 @@ func (s *WritersSuite) TestOSClient_Create(c *C) {
f, err := client.Create("foo")
c.Assert(err, IsNil)
- c.Assert(f.(*OSFile).file.Name(), Equals, f.Filename())
+ c.Assert(f.Filename(), Equals, "foo")
}
func (s *WritersSuite) TestOSClient_Write(c *C) {
@@ -46,7 +46,7 @@ func (s *WritersSuite) TestOSClient_Close(c *C) {
f.Write([]byte("foo"))
c.Assert(f.Close(), IsNil)
- wrote, _ := ioutil.ReadFile(f.Filename())
+ wrote, _ := ioutil.ReadFile(f.(*OSFile).file.Name())
c.Assert(wrote, DeepEquals, []byte("foo"))
}