Skip to content

Commit

Permalink
Replace the string with constants from the http package
Browse files Browse the repository at this point in the history
Signed-off-by: Zechun Chen <zechun.chen@daocloud.io>
  • Loading branch information
Fish-pro authored and squeed committed May 24, 2023
1 parent d08483c commit e9a2805
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion daemon/cmd/kube_proxy_healthz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (s *KubeProxyHealthzTestSuite) healthTestHelper(c *C, ciliumStatus string,
injectedLastUpdatedTs: lastUpdateTs}}

// Create a new request.
req, err := http.NewRequest("GET", "/healthz", nil)
req, err := http.NewRequest(http.MethodGet, "/healthz", nil)
c.Assert(err, IsNil)
w := httptest.NewRecorder()

Expand Down
2 changes: 1 addition & 1 deletion pkg/hive/example/events_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func newEventsHandler(ee ExampleEvents) HTTPHandlerOut {
Path: "/events",
Handler: func(w http.ResponseWriter, req *http.Request) {
f := w.(http.Flusher)
w.WriteHeader(200)
w.WriteHeader(http.StatusOK)

for ev := range stream.ToChannel[ExampleEvent](req.Context(), ee) {
fmt.Fprintf(w, "%s\n", ev.Message)
Expand Down

0 comments on commit e9a2805

Please sign in to comment.