Must have a git username, password, consumer key, and consumer rsa

This commit is contained in:
Joachim Hill-Grannec 2016-04-19 13:29:52 -07:00
parent 0a20d9c1d2
commit d982f73f8e

View file

@ -47,9 +47,21 @@ func Load(config string) *BitbucketServer{
bitbucketserver := BitbucketServer{}
bitbucketserver.URL = url_.String()
bitbucketserver.GitUserName = params.Get("git_username")
if bitbucketserver.GitUserName == "" {
log.FatalLevel("Must have a git_username")
}
bitbucketserver.GitPassword = params.Get("git_password")
if bitbucketserver.GitPassword == "" {
log.FatalLevel("Must have a git_password")
}
bitbucketserver.ConsumerKey = params.Get("consumer_key")
if bitbucketserver.ConsumerKey == "" {
log.FatalLevel("Must have a consumer_key")
}
bitbucketserver.ConsumerRSA = params.Get("consumer_rsa")
if bitbucketserver.ConsumerRSA == "" {
log.FatalLevel("Must have a consumer_rsa")
}
bitbucketserver.Open, _ = strconv.ParseBool(params.Get("open"))