changeset 359:ac7e0f980456

Unexport [Rr]oundTripFunc type.
author Sascha L. Teichmann <teichmann@intevation.de>
date Wed, 08 Aug 2018 10:44:18 +0200
parents 55388227e7da
children 6d145ee0a097
files controllers/externalwfs.go controllers/routes.go
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/controllers/externalwfs.go	Tue Aug 07 19:28:03 2018 +0200
+++ b/controllers/externalwfs.go	Wed Aug 08 10:44:18 2018 +0200
@@ -17,9 +17,10 @@
 	"gemma.intevation.de/gemma/config"
 )
 
-type RoundTripFunc func(*http.Request) (*http.Response, error)
+// roundTripFunc is a helper type to make externalWFSDirector a http.RoundTripper.
+type roundTripFunc func(*http.Request) (*http.Response, error)
 
-func (rtf RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) {
+func (rtf roundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) {
 	return rtf(req)
 }
 
--- a/controllers/routes.go	Tue Aug 07 19:28:03 2018 +0200
+++ b/controllers/routes.go	Wed Aug 08 10:44:18 2018 +0200
@@ -54,7 +54,7 @@
 	// Proxy for external WFSs.
 	externalWFSProxy := &httputil.ReverseProxy{
 		Director:       externalWFSDirector,
-		Transport:      RoundTripFunc(externalWFSTransport),
+		Transport:      roundTripFunc(externalWFSTransport),
 		ModifyResponse: externalWFSModifyResponse,
 	}