Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-10-02 10:32:46 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-10-02 10:38:01 +0300
commit78c7e7be19993403054f8584fbc5b6c17885b20f (patch)
tree2d8dd67cf26cc288454688eb6ec419fd186d474e
parentefe810fe6b3e36f8fe1fa297e02c5914ba0bce5a (diff)
Only log domain name as we no longer have location info
-rw-r--r--go.mod2
-rw-r--r--internal/domain/domain.go3
-rw-r--r--internal/source/disk/map.go13
3 files changed, 5 insertions, 13 deletions
diff --git a/go.mod b/go.mod
index 046398e2..2c4252a4 100644
--- a/go.mod
+++ b/go.mod
@@ -13,8 +13,6 @@ require (
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
github.com/karrick/godirwalk v1.10.12
- github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
- github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/namsral/flag v1.7.4-pre
github.com/prometheus/client_golang v1.1.0
github.com/rs/cors v1.7.0
diff --git a/internal/domain/domain.go b/internal/domain/domain.go
index febb488f..f7eba5ca 100644
--- a/internal/domain/domain.go
+++ b/internal/domain/domain.go
@@ -40,9 +40,6 @@ func (d *Domain) isUnconfigured() bool {
}
func (d *Domain) resolve(r *http.Request) (*serving.LookupPath, string) {
- // TODO use lookupPaths to cache information about projects better, to
- // improve performance and resilience
-
lookupPath, subpath, _ := d.Resolver.Resolve(r)
// Current implementation does not return errors in any case
diff --git a/internal/source/disk/map.go b/internal/source/disk/map.go
index 3fb7bd4a..b5843301 100644
--- a/internal/source/disk/map.go
+++ b/internal/source/disk/map.go
@@ -22,14 +22,11 @@ type Map map[string]*domain.Domain
type domainsUpdater func(Map)
func (dm Map) updateDomainMap(domainName string, domain *domain.Domain) {
- // TODOHERE:
- // if old, ok := dm[domainName]; ok {
- // log.WithFields(log.Fields{
- // "domain_name": domainName,
- // "new_location": domain.Location,
- // "old_location": old.Location,
- // }).Error("Duplicate domain")
- // }
+ if _, ok := dm[domainName]; ok {
+ log.WithFields(log.Fields{
+ "domain_name": domainName,
+ }).Error("Duplicate domain")
+ }
dm[domainName] = domain
}