Return errors for failed host clients

This commit is contained in:
Peter Gallagher committed 2019-12-05 12:11:46 +00:00
1 parent c5e1e8abc0
commit f89b8f2b29
3 files changed
+11 -8

No files matched your search

+4 -2
View File
@@ -22,7 +22,9 @@ type Gitlab struct {
// NewGitlabClient accepts a manager struct and returns a Gitlab host pointer which will be used to
// perform a gitlab audit on an group or user.
func NewGitlabClient(m manager.Manager) *Gitlab {
func NewGitlabClient(m manager.Manager) (*Gitlab, error) {
var err error
gitlabClient := &Gitlab{
manager: m,
ctx: context.Background(),
@@ -36,7 +38,7 @@ func NewGitlabClient(m manager.Manager) *Gitlab {
}
}
return gitlabClient
return gitlabClient, err
}
// Audit will audit a github user or organization's repos.