From 305f28004ecbc03ea353437cf4c76423d93fbbd8 Mon Sep 17 00:00:00 2001 From: Antonio Jesus Navarro Perez Date: Tue, 28 Feb 2017 11:56:10 +0100 Subject: _examples: improve documentation --- _examples/showcase/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '_examples/showcase') diff --git a/_examples/showcase/main.go b/_examples/showcase/main.go index 7772d84..82c2acf 100644 --- a/_examples/showcase/main.go +++ b/_examples/showcase/main.go @@ -11,6 +11,14 @@ import ( . "srcd.works/go-git.v4/_examples" ) +// Example of an specific use case: +// - Clone a repository in a specific path +// - Get the HEAD reference +// - Using the HEAD reference, obtain the commit this reference is pointing to +// - Print the commit content +// - Using the commit, iterate all its files and print them +// - Print all the commit history with commit messages, short hash and the +// first line of the commit message func main() { CheckArgs(" ") url := os.Args[1] -- cgit