Add README, removing wrong logger dependency

This commit is contained in:
2018-03-05 07:49:44 +01:00
parent 35764c9b12
commit 247ce0f378
2 changed files with 39 additions and 3 deletions

View File

@@ -3,11 +3,10 @@ package fizzbuzz
import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"strconv"
"github.com/wallix/awless/logger"
)
// Server represents an instance of a fizzbuzz server
@@ -47,7 +46,7 @@ func (s *Server) handleFizzBuzz(w http.ResponseWriter, r *http.Request) {
}
if err = json.NewEncoder(w).Encode(in.generateFizzbuzz()); err != nil {
logger.Errorf("error while encoding '%#v': %s", in, err.Error())
log.Printf("error while encoding '%#v': %s", in, err.Error())
http.Error(w, "encoding problem", http.StatusInternalServerError)
}
}