From 78c7e7be19993403054f8584fbc5b6c17885b20f Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 2 Oct 2019 09:32:46 +0200 Subject: Only log domain name as we no longer have location info --- go.mod | 2 -- internal/domain/domain.go | 3 --- internal/source/disk/map.go | 13 +++++-------- 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 } -- cgit v1.2.3