Skip to content

Commit

Permalink
server: fix static check issues (#13878)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 authored and sre-bot committed Dec 28, 2019
1 parent 2a4bd92 commit 1d2377f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/http_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (ts *HTTPHandlerTestSuite) TestListTableRegions(c *C) {
c.Assert(err, IsNil)

region := data[1]
resp, err = http.Get(fmt.Sprintf("http://127.0.0.1:10090/regions/%d", region.TableID))
_, err = http.Get(fmt.Sprintf("http://127.0.0.1:10090/regions/%d", region.TableID))
c.Assert(err, IsNil)
}

Expand Down Expand Up @@ -767,7 +767,7 @@ func (ts *HTTPHandlerTestSuite) TestGetSchema(c *C) {
c.Assert(err, IsNil)
c.Assert(t.Name.L, Equals, "t1")

resp, err = http.Get(fmt.Sprintf(fmt.Sprintf("http://127.0.0.1:10090/db-table/%v", t.GetPartitionInfo().Definitions[0].ID)))
resp, err = http.Get(fmt.Sprintf("http://127.0.0.1:10090/db-table/%v", t.GetPartitionInfo().Definitions[0].ID))
c.Assert(err, IsNil)
decoder = json.NewDecoder(resp.Body)
err = decoder.Decode(&dbtbl)
Expand Down
2 changes: 1 addition & 1 deletion server/http_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (s *Server) startHTTPServer() {
httpRouterPage.WriteString("<tr><td><a href='/debug/pprof/'>Debug</a><td></tr>")
httpRouterPage.WriteString("</table></body></html>")
router.HandleFunc("/", func(responseWriter http.ResponseWriter, request *http.Request) {
_, err = responseWriter.Write([]byte(httpRouterPage.String()))
_, err = responseWriter.Write(httpRouterPage.Bytes())
if err != nil {
logutil.BgLogger().Error("write HTTP index page failed", zap.Error(err))
}
Expand Down

0 comments on commit 1d2377f

Please sign in to comment.