From 072b83c49dc35349f88afbd9bfd107742113e680 Mon Sep 17 00:00:00 2001 From: dingjun Date: Tue, 30 Jun 2020 19:38:58 +0800 Subject: [PATCH] remove unused field --- server.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/server.go b/server.go index c397a9e..f836b8a 100644 --- a/server.go +++ b/server.go @@ -17,7 +17,6 @@ type server struct { cert string key string upstreams []*url.URL - bootstrap []*url.URL } func (srv *server) serve() { @@ -134,7 +133,7 @@ func (srv *server) serveHTTP() { func makeServers(c *conf) { upstreams := []*url.URL{} - bootstraps := []*url.URL{} + for _, a := range c.UpstreamServers { u, err := url.Parse(a) if err != nil { @@ -143,14 +142,6 @@ func makeServers(c *conf) { upstreams = append(upstreams, u) } - for _, a := range c.BootstrapServers { - u, err := url.Parse(a) - if err != nil { - log.Fatal(err) - } - bootstraps = append(bootstraps, u) - } - for _, l := range c.Listen { u, err := url.Parse(l.Addr) if err != nil { @@ -161,7 +152,6 @@ func makeServers(c *conf) { cert: l.Cert, key: l.Key, upstreams: upstreams, - bootstrap: bootstraps, } go srv.serve() }