@@ -80,17 +80,17 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
8080 escPath , escVers := mod [:i ], mod [i + 1 :]
8181 path , err := module .UnescapePath (escPath )
8282 if err != nil {
83- reportError (w , r , err )
83+ reportError (w , err )
8484 return
8585 }
8686 vers , err := module .UnescapeVersion (escVers )
8787 if err != nil {
88- reportError (w , r , err )
88+ reportError (w , err )
8989 return
9090 }
9191 id , err := s .ops .Lookup (ctx , module.Version {Path : path , Version : vers })
9292 if err != nil {
93- reportError (w , r , err )
93+ reportError (w , err )
9494 return
9595 }
9696 records , err := s .ops .ReadRecords (ctx , id , 1 )
@@ -137,7 +137,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
137137 start := t .N << uint (t .H )
138138 records , err := s .ops .ReadRecords (ctx , start , int64 (t .W ))
139139 if err != nil {
140- reportError (w , r , err )
140+ reportError (w , err )
141141 return
142142 }
143143 if len (records ) != t .W {
@@ -159,7 +159,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
159159
160160 data , err := s .ops .ReadTileData (ctx , t )
161161 if err != nil {
162- reportError (w , r , err )
162+ reportError (w , err )
163163 return
164164 }
165165 w .Header ().Set ("Content-Type" , "application/octet-stream" )
@@ -172,7 +172,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
172172// Otherwise it is an internal server error.
173173// The caller must only call reportError in contexts where
174174// a not-found err should be reported as 404.
175- func reportError (w http.ResponseWriter , r * http. Request , err error ) {
175+ func reportError (w http.ResponseWriter , err error ) {
176176 if os .IsNotExist (err ) {
177177 http .Error (w , err .Error (), http .StatusNotFound )
178178 return
0 commit comments