Skip to content

Commit 88c71ae

Browse files
etsangsplkakshayjshah
authored andcommitted
use http constants for method (uber-go#597)
1 parent 2b73827 commit 88c71ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

http_handler.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ func (lvl AtomicLevel) ServeHTTP(w http.ResponseWriter, r *http.Request) {
4848

4949
switch r.Method {
5050

51-
case "GET":
51+
case http.MethodGet:
5252
current := lvl.Level()
5353
enc.Encode(payload{Level: &current})
5454

55-
case "PUT":
55+
case http.MethodPut:
5656
var req payload
5757

5858
if errmess := func() string {

0 commit comments

Comments
 (0)