aboutsummaryrefslogtreecommitdiffstats
path: root/examples/basic/main.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-08-14 00:44:18 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-08-14 00:44:18 +0200
commitf826cf9d42cc34e2ae5aaf6ede892ecab9d2f198 (patch)
tree7555e7596887f239ce26828e98142e4df25c388f /examples/basic/main.go
parent79087748f60f9aba219624a0fe9f4d33a0b51236 (diff)
downloadgo-git-f826cf9d42cc34e2ae5aaf6ede892ecab9d2f198.tar.gz
fix tests and examples
Diffstat (limited to 'examples/basic/main.go')
-rw-r--r--examples/basic/main.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/basic/main.go b/examples/basic/main.go
index 6dc2ba1..fd7f82e 100644
--- a/examples/basic/main.go
+++ b/examples/basic/main.go
@@ -9,13 +9,14 @@ import (
)
func main() {
- fmt.Printf("Retrieving %q ...\n", os.Args[1])
- r, err := git.NewRepository(os.Args[1], nil)
+ url := os.Args[1]
+ fmt.Printf("Retrieving %q ...\n", url)
+ r, err := git.NewMemoryRepository()
if err != nil {
panic(err)
}
- if err = r.PullDefault(); err != nil {
+ if err = r.Clone(&git.CloneOptions{URL: url}); err != nil {
panic(err)
}