diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2018-03-22 19:26:33 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2018-03-22 19:26:33 +0300 |
commit | 4f6fa0e5aab3bcf6e7b510f1678c83d420e05cba (patch) | |
tree | ba539af17dd7a071185152b321dff66753b1d19c /app.go | |
parent | 5987070946907a8d3411869ca166fd192d261b65 (diff) |
Rename 'domains' type to 'domainMap'
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -29,20 +29,20 @@ var ( type theApp struct { appConfig - domains domains + dm domainMap lock sync.RWMutex Artifact *artifact.Artifact } func (a *theApp) isReady() bool { - return a.domains != nil + return a.dm != nil } func (a *theApp) domain(host string) *domain { host = strings.ToLower(host) a.lock.RLock() defer a.lock.RUnlock() - domain, _ := a.domains[host] + domain, _ := a.dm[host] return domain } @@ -157,10 +157,10 @@ func (a *theApp) ServeProxy(ww http.ResponseWriter, r *http.Request) { a.serveContent(ww, r, https) } -func (a *theApp) UpdateDomains(domains domains) { +func (a *theApp) UpdateDomains(dm domainMap) { a.lock.Lock() defer a.lock.Unlock() - a.domains = domains + a.dm = dm } func (a *theApp) Run() { |