diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2016-04-01 17:45:07 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2016-04-01 17:45:07 +0200 |
commit | c7736d8e94b98c0a4cb9069195cf0e0cfe147283 (patch) | |
tree | 71d3405d7702e2cb8dac4c26137ed94b4ff198a0 /route.go | |
parent | e3b305e171e6aae5b12db75674003604d0292c9e (diff) |
Readd rpc.List
Diffstat (limited to 'route.go')
-rw-r--r-- | route.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -19,6 +19,10 @@ type route struct { Certificate *tls.Certificate } +func (r route) String() string { + return fmt.Sprintf("%v → %v", r.ServerName, r.Upstream) +} + // GetCertificate returns certificate for SNI negotiation func (r Route) GetCertificate(h *tls.ClientHelloInfo) (*tls.Certificate, error) { host := h.ServerName @@ -55,7 +59,7 @@ func (r *Route) Load(fname string) error { } func (r Route) ServeHTTP(w http.ResponseWriter, _ *http.Request) { - for k, v := range r { - fmt.Fprintln(w, k, "→", v) + for _, v := range r { + fmt.Fprintln(w, v) } } |