mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
Return errors for failed host clients
This commit is contained in:
1 parent
c5e1e8abc0
commit
f89b8f2b29
3 files changed
+11
-8
No files matched your search
+4
-2
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user