feat: changed gitlab-hostname to gitlab-url
This commit is contained in:
parent
c113e036f4
commit
0f9143c6f5
1 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ func manageArguments() {
|
||||||
var archivedFlag = flag.String("archived", "excluded", "to include archived repositories (any|excluded|exclusive)\nenv = GOGITLABBER_ARCHIVED\n")
|
var archivedFlag = flag.String("archived", "excluded", "to include archived repositories (any|excluded|exclusive)\nenv = GOGITLABBER_ARCHIVED\n")
|
||||||
var destinationFlag = flag.String("destination", "", "specify where to check the repositories out\n example: -destination=$HOME/repos\nenv = GOGITLABBER_DESTINATION\n")
|
var destinationFlag = flag.String("destination", "", "specify where to check the repositories out\n example: -destination=$HOME/repos\nenv = GOGITLABBER_DESTINATION\n")
|
||||||
var tokenFlag = flag.String("gitlab-api-token", "", "specify gitlab api token\n example: -gitlab-api=glpat-xxxx\nenv = GITLAB_API_TOKEN\n")
|
var tokenFlag = flag.String("gitlab-api-token", "", "specify gitlab api token\n example: -gitlab-api=glpat-xxxx\nenv = GITLAB_API_TOKEN\n")
|
||||||
var hostFlag = flag.String("gitlab-url", "", "specify gitlab host\n example: -gitlab-url=gitlab.example.com\nenv = GITLAB_HOSTNAME\n")
|
var hostFlag = flag.String("gitlab-url", "", "specify gitlab host\n example: -gitlab-url=gitlab.example.com\nenv = GITLAB_URL\n")
|
||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@ func manageArguments() {
|
||||||
gitlabHost = *hostFlag
|
gitlabHost = *hostFlag
|
||||||
|
|
||||||
// use environment variable if set, otherwise use flag value
|
// use environment variable if set, otherwise use flag value
|
||||||
if envHost := os.Getenv("GITLAB_HOSTNAME"); envHost != "" {
|
if envHost := os.Getenv("GITLAB_URL"); envHost != "" {
|
||||||
gitlabHost = envHost
|
gitlabHost = envHost
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue