diff options
author | ferhat elmas <elmas.ferhat@gmail.com> | 2016-11-15 01:18:53 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-11-15 01:18:53 +0100 |
commit | 16d86605732ba3198c0acd4317b53cf4991a7d4d (patch) | |
tree | 3306f0438235f7dfe19fd37c5393a4794abe0535 /plumbing/client/common/common.go | |
parent | eb89d2dd9a36440d58aea224c055b364e49785f7 (diff) | |
download | go-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 'plumbing/client/common/common.go')
-rw-r--r-- | plumbing/client/common/common.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plumbing/client/common/common.go b/plumbing/client/common/common.go index 97f78c4..b2d52e8 100644 --- a/plumbing/client/common/common.go +++ b/plumbing/client/common/common.go @@ -36,6 +36,9 @@ type GitUploadPackService interface { Disconnect() error } +// GitUploadPackServiceFactory is capable of instantiating GitUploadPackService with given endpoint +type GitUploadPackServiceFactory func(Endpoint) GitUploadPackService + type AuthMethod interface { Name() string String() string |