aboutsummaryrefslogtreecommitdiffstats
path: root/examples/fs_implementation
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-08-18 11:04:26 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-08-18 11:04:26 +0200
commit27d27020ba5f5b7b96d24454f6d09eaecfba6a76 (patch)
tree83e7ff3bfd85b56fbb7551ef3e3082832b410702 /examples/fs_implementation
parent0ed8e180c604f8ff6d68fcaad081978a407e4653 (diff)
downloadgo-git-27d27020ba5f5b7b96d24454f6d09eaecfba6a76.tar.gz
examples: fix fs_implementation example
Diffstat (limited to 'examples/fs_implementation')
-rw-r--r--examples/fs_implementation/main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/fs_implementation/main.go b/examples/fs_implementation/main.go
index a9bfbe6..626cc8a 100644
--- a/examples/fs_implementation/main.go
+++ b/examples/fs_implementation/main.go
@@ -9,6 +9,7 @@ import (
"strings"
"gopkg.in/src-d/go-git.v4"
+ "gopkg.in/src-d/go-git.v4/storage/filesystem"
"gopkg.in/src-d/go-git.v4/utils/fs"
)
@@ -20,7 +21,13 @@ func main() {
fs := NewCustomFS(os.Args[1])
- repo, err := git.NewFilesystemRepository(fs, ".git")
+ s, err := filesystem.NewStorage(fs, ".git")
+ if err != nil {
+ fmt.Fprint(os.Stderr, err)
+ os.Exit(1)
+ }
+
+ repo, err := git.NewRepository(s)
if err != nil {
fmt.Fprint(os.Stderr, err)
os.Exit(1)