Skip to content

Commit

Permalink
Code Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
julienschmidt committed Apr 21, 2015
1 parent 1636fa1 commit 8c199fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ func BasicAuth(h httprouter.Handle, user, pass []byte) httprouter.Handle {
payload, err := base64.StdEncoding.DecodeString(auth[len(basicAuthPrefix):])
if err == nil {
pair := bytes.SplitN(payload, []byte(":"), 2)
if len(pair) == 2 && bytes.Equal(pair[0], user) && bytes.Equal(pair[1], pass) {
if len(pair) == 2 &&
bytes.Equal(pair[0], user) &&
bytes.Equal(pair[1], pass) {

// Delegate request to the given handle
h(w, r, ps)
return
Expand Down

0 comments on commit 8c199fb

Please sign in to comment.