aboutsummaryrefslogtreecommitdiffstats
path: root/doc.go
diff options
context:
space:
mode:
authorferhat elmas <elmas.ferhat@gmail.com>2016-11-15 01:18:53 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2016-11-15 01:18:53 +0100
commit16d86605732ba3198c0acd4317b53cf4991a7d4d (patch)
tree3306f0438235f7dfe19fd37c5393a4794abe0535 /doc.go
parenteb89d2dd9a36440d58aea224c055b364e49785f7 (diff)
downloadgo-git-16d86605732ba3198c0acd4317b53cf4991a7d4d.tar.gz
Add configurable http client factory (fixes #120) (#121)
* new http client factory ready to install/override default http(s) * mv GitUploadPackServiceFactory to clients.common pkg * rename http.HTTPError to http.Err * rename http.HTTPAuthMethod to http.AuthMethod * add doc and examples/ usage * general improvements: - update install link in readme to v4 (example are already pointing v4) - fix indentation in package doc (styling for godoc.org) - use http.Status constants instead of integers - close leaked response body - rm named returns which stutter in doc - fix one format string - rm unnecessary if checks - documentation fixes
Diffstat (limited to 'doc.go')
-rw-r--r--doc.go49
1 files changed, 25 insertions, 24 deletions
diff --git a/doc.go b/doc.go
index 8d00689..03367b8 100644
--- a/doc.go
+++ b/doc.go
@@ -6,31 +6,32 @@
// extensions.
//
// Small example extracting the commits from a repository:
-// func ExampleBasic_printCommits() {
-// r := git.NewMemoryRepository()
-// o := &git.CloneOptions{
-// URL: "https://github.com/src-d/go-git",
-// }
-// if err := r.Clone(o); err != nil {
-// panic(err)
-// }
//
-// iter, err := r.Commits()
-// if err != nil {
-// panic(err)
-// }
-// defer iter.Close()
+// func ExampleBasic_printCommits() {
+// r := git.NewMemoryRepository()
+// o := &git.CloneOptions{
+// URL: "https://github.com/src-d/go-git",
+// }
+// if err := r.Clone(o); err != nil {
+// panic(err)
+// }
//
-// for {
-// commit, err := iter.Next()
-// if err != nil {
-// if err == io.EOF {
-// break
-// }
-// panic(err)
-// }
+// iter, err := r.Commits()
+// if err != nil {
+// panic(err)
+// }
+// defer iter.Close()
//
-// fmt.Println(commit)
-// }
-// }
+// for {
+// commit, err := iter.Next()
+// if err != nil {
+// if err == io.EOF {
+// break
+// }
+// panic(err)
+// }
+//
+// fmt.Println(commit)
+// }
+// }
package git // import "gopkg.in/src-d/go-git.v4"