@@ -19,7 +19,7 @@ import (
1919
2020var nilValues = url.Values {}
2121
22- func notImplementedHandler (w http.ResponseWriter , r * http.Request ) {
22+ func notImplementedHandler (w http.ResponseWriter , _ * http.Request ) {
2323 writeError (w , http .StatusNotImplemented , nil )
2424}
2525
@@ -34,12 +34,12 @@ func (h *HTTPBin) Index(w http.ResponseWriter, r *http.Request) {
3434}
3535
3636// FormsPost renders an HTML form that submits a request to the /post endpoint
37- func (h * HTTPBin ) FormsPost (w http.ResponseWriter , r * http.Request ) {
37+ func (h * HTTPBin ) FormsPost (w http.ResponseWriter , _ * http.Request ) {
3838 writeHTML (w , mustStaticAsset ("forms-post.html" ), http .StatusOK )
3939}
4040
4141// UTF8 renders an HTML encoding stress test
42- func (h * HTTPBin ) UTF8 (w http.ResponseWriter , r * http.Request ) {
42+ func (h * HTTPBin ) UTF8 (w http.ResponseWriter , _ * http.Request ) {
4343 writeHTML (w , mustStaticAsset ("utf8.html" ), http .StatusOK )
4444}
4545
@@ -80,7 +80,7 @@ func (h *HTTPBin) RequestWithBody(w http.ResponseWriter, r *http.Request) {
8080 URL : getURL (r ).String (),
8181 }
8282
83- if err := parseBody (w , r , resp ); err != nil {
83+ if err := parseBody (r , resp ); err != nil {
8484 writeError (w , http .StatusBadRequest , fmt .Errorf ("error parsing request body: %w" , err ))
8585 return
8686 }
@@ -718,20 +718,20 @@ func (h *HTTPBin) Range(w http.ResponseWriter, r *http.Request) {
718718}
719719
720720// HTML renders a basic HTML page
721- func (h * HTTPBin ) HTML (w http.ResponseWriter , r * http.Request ) {
721+ func (h * HTTPBin ) HTML (w http.ResponseWriter , _ * http.Request ) {
722722 writeHTML (w , mustStaticAsset ("moby.html" ), http .StatusOK )
723723}
724724
725725// Robots renders a basic robots.txt file
726- func (h * HTTPBin ) Robots (w http.ResponseWriter , r * http.Request ) {
726+ func (h * HTTPBin ) Robots (w http.ResponseWriter , _ * http.Request ) {
727727 robotsTxt := []byte (`User-agent: *
728728Disallow: /deny
729729` )
730730 writeResponse (w , http .StatusOK , textContentType , robotsTxt )
731731}
732732
733733// Deny renders a basic page that robots should never access
734- func (h * HTTPBin ) Deny (w http.ResponseWriter , r * http.Request ) {
734+ func (h * HTTPBin ) Deny (w http.ResponseWriter , _ * http.Request ) {
735735 writeResponse (w , http .StatusOK , textContentType , []byte (`YOU SHOULDN'T BE HERE` ))
736736}
737737
@@ -926,7 +926,7 @@ func (h *HTTPBin) Links(w http.ResponseWriter, r *http.Request) {
926926}
927927
928928// doLinksPage renders a page with a series of N links
929- func doLinksPage (w http.ResponseWriter , r * http.Request , n int , offset int ) {
929+ func doLinksPage (w http.ResponseWriter , _ * http.Request , n int , offset int ) {
930930 w .Header ().Add ("Content-Type" , htmlContentType )
931931 w .WriteHeader (http .StatusOK )
932932
@@ -988,7 +988,7 @@ func doImage(w http.ResponseWriter, kind string) {
988988}
989989
990990// XML responds with an XML document
991- func (h * HTTPBin ) XML (w http.ResponseWriter , r * http.Request ) {
991+ func (h * HTTPBin ) XML (w http.ResponseWriter , _ * http.Request ) {
992992 writeResponse (w , http .StatusOK , "application/xml" , mustStaticAsset ("sample.xml" ))
993993}
994994
@@ -1042,7 +1042,7 @@ func (h *HTTPBin) DigestAuth(w http.ResponseWriter, r *http.Request) {
10421042}
10431043
10441044// UUID - responds with a generated UUID
1045- func (h * HTTPBin ) UUID (w http.ResponseWriter , r * http.Request ) {
1045+ func (h * HTTPBin ) UUID (w http.ResponseWriter , _ * http.Request ) {
10461046 writeJSON (http .StatusOK , w , uuidResponse {
10471047 UUID : uuidv4 (),
10481048 })
@@ -1085,7 +1085,7 @@ func (h *HTTPBin) DumpRequest(w http.ResponseWriter, r *http.Request) {
10851085}
10861086
10871087// JSON - returns a sample json
1088- func (h * HTTPBin ) JSON (w http.ResponseWriter , r * http.Request ) {
1088+ func (h * HTTPBin ) JSON (w http.ResponseWriter , _ * http.Request ) {
10891089 w .Header ().Set ("Content-Type" , jsonContentType )
10901090 w .WriteHeader (http .StatusOK )
10911091 w .Write (mustStaticAsset ("sample.json" ))
@@ -1107,7 +1107,7 @@ func (h *HTTPBin) Bearer(w http.ResponseWriter, r *http.Request) {
11071107}
11081108
11091109// Hostname - returns the hostname.
1110- func (h * HTTPBin ) Hostname (w http.ResponseWriter , r * http.Request ) {
1110+ func (h * HTTPBin ) Hostname (w http.ResponseWriter , _ * http.Request ) {
11111111 writeJSON (http .StatusOK , w , hostnameResponse {
11121112 Hostname : h .hostname ,
11131113 })
0 commit comments