Skip to content

Commit

Permalink
use http constants for method (uber-go#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
etsangsplk authored and akshayjshah committed May 31, 2018
1 parent 2b73827 commit 88c71ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ func (lvl AtomicLevel) ServeHTTP(w http.ResponseWriter, r *http.Request) {

switch r.Method {

case "GET":
case http.MethodGet:
current := lvl.Level()
enc.Encode(payload{Level: &current})

case "PUT":
case http.MethodPut:
var req payload

if errmess := func() string {
Expand Down

0 comments on commit 88c71ae

Please sign in to comment.