From 27d27020ba5f5b7b96d24454f6d09eaecfba6a76 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Thu, 18 Aug 2016 11:04:26 +0200 Subject: examples: fix fs_implementation example --- examples/fs_implementation/main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'examples/fs_implementation/main.go') 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) -- cgit