From 3967812bd0de40330dfbb9e1a7d14d4073cc1b10 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Mon, 12 Dec 2016 15:50:03 +0100 Subject: examples: review, testing and documentation (#176) * examples reviews, testing and documentation * including the execution on travis, and fix readme * fix example link * including the execution on travis --- examples/latest/latest.go | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 examples/latest/latest.go (limited to 'examples/latest/latest.go') diff --git a/examples/latest/latest.go b/examples/latest/latest.go deleted file mode 100644 index 05f583a..0000000 --- a/examples/latest/latest.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "gopkg.in/src-d/go-git.v4" -) - -func main() { - url := os.Args[1] - - fmt.Printf("Retrieving latest commit from: %q ...\n", url) - r := git.NewMemoryRepository() - - if err := r.Clone(&git.CloneOptions{URL: url}); err != nil { - panic(err) - } - - head, err := r.Head() - if err != nil { - panic(err) - } - - commit, err := r.Commit(head.Hash()) - if err != nil { - panic(err) - } - - fmt.Println(commit) -} -- cgit