aboutsummaryrefslogtreecommitdiffstats
path: root/examples/fs_implementation/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'examples/fs_implementation/main.go')
-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)