start refactor Upstream func

This commit is contained in:
6543 2021-12-05 15:59:43 +01:00
parent de4706bf58
commit e6198e4ddd
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
3 changed files with 7 additions and 8 deletions

View file

@ -24,7 +24,7 @@ func CheckCanonicalDomain(targetOwner, targetRepo, targetBranch, actualDomain, m
req.SetRequestURI(giteaRoot + "/api/v1/repos/" + targetOwner + "/" + targetRepo + "/raw/" + targetBranch + "/.domains" + "?access_token=" + giteaApiToken)
res := fasthttp.AcquireResponse()
err := Client.Do(req, res)
err := client.Do(req, res)
if err == nil && res.StatusCode() == fasthttp.StatusOK {
for _, domain := range strings.Split(string(res.Body()), "\n") {
domain = strings.ToLower(domain)