Loading controllers/checkerboard/checkerboard.go +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ import ( // Color is the handler for /checkerboard/:colorId // build a 6x6 checkerboard with alternate colors based on the number passed in the url func Color(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") if colorId, err := strconv.ParseInt(id, 0, 64); err != nil { log.Printf("error when extracting permalink id: %v", err) } else { Loading controllers/isogrids/isogrids.go +5 −5 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ import ( // Isogrids is the handler for /isogrids/:key // builds a 10x10 grid with alternate colors based on the string passed in the url. func Isogrids(w http.ResponseWriter, r *http.Request) { key := route.Context.Get(r, "key") key, _ := route.Context.Get(r, "key") h := md5.New() io.WriteString(h, key) key = fmt.Sprintf("%x", h.Sum(nil)[:]) Loading @@ -41,14 +41,14 @@ func Isogrids(w http.ResponseWriter, r *http.Request) { // Color is the handler for /isogrids/:colorId/:key // builds a 10x10 grid with alternate colors based on the string passed in the url. func Color(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") colorId, err := strconv.ParseInt(id, 0, 64) if err != nil { colorId = 0 } key := route.Context.Get(r, "key") key, _ := route.Context.Get(r, "key") h := md5.New() io.WriteString(h, key) key = fmt.Sprintf("%x", h.Sum(nil)[:]) Loading Loading @@ -164,7 +164,7 @@ func Random(w http.ResponseWriter, r *http.Request) { } func RandomColor(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") colorId, err := strconv.ParseInt(id, 0, 64) if err != nil { colorId = 0 Loading Loading @@ -199,7 +199,7 @@ func RandomMirror(w http.ResponseWriter, r *http.Request) { } func RandomMirrorColor(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") colorId, err := strconv.ParseInt(id, 0, 64) if err != nil { colorId = 0 Loading controllers/squares/random.go +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ func Random(w http.ResponseWriter, r *http.Request) { // handler for "/squares/random/:colorId" // generates a grid random image with a specific color based on the colorMap func RandomColor(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") if colorId, err := strconv.ParseInt(id, 0, 64); err != nil { log.Printf("error when extracting permalink id: %v", err) } else { Loading controllers/squares/square.go +3 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ import ( // Square is the handler for /squares/:key // builds a 6x6 grid with alternate colors based on the number passed in the url. func Square(w http.ResponseWriter, r *http.Request) { key := route.Context.Get(r, "key") key, _ := route.Context.Get(r, "key") h := md5.New() io.WriteString(h, key) key = fmt.Sprintf("%x", h.Sum(nil)[:]) Loading Loading @@ -61,13 +61,13 @@ func Square(w http.ResponseWriter, r *http.Request) { // build a 6x6 grid with alternate colors based on the number passed in the url func Color(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") colorId, err := strconv.ParseInt(id, 0, 64) if err != nil { colorId = 0 } key := route.Context.Get(r, "key") key, _ := route.Context.Get(r, "key") h := md5.New() io.WriteString(h, key) key = fmt.Sprintf("%x", h.Sum(nil)[:]) Loading Loading
controllers/checkerboard/checkerboard.go +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ import ( // Color is the handler for /checkerboard/:colorId // build a 6x6 checkerboard with alternate colors based on the number passed in the url func Color(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") if colorId, err := strconv.ParseInt(id, 0, 64); err != nil { log.Printf("error when extracting permalink id: %v", err) } else { Loading
controllers/isogrids/isogrids.go +5 −5 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ import ( // Isogrids is the handler for /isogrids/:key // builds a 10x10 grid with alternate colors based on the string passed in the url. func Isogrids(w http.ResponseWriter, r *http.Request) { key := route.Context.Get(r, "key") key, _ := route.Context.Get(r, "key") h := md5.New() io.WriteString(h, key) key = fmt.Sprintf("%x", h.Sum(nil)[:]) Loading @@ -41,14 +41,14 @@ func Isogrids(w http.ResponseWriter, r *http.Request) { // Color is the handler for /isogrids/:colorId/:key // builds a 10x10 grid with alternate colors based on the string passed in the url. func Color(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") colorId, err := strconv.ParseInt(id, 0, 64) if err != nil { colorId = 0 } key := route.Context.Get(r, "key") key, _ := route.Context.Get(r, "key") h := md5.New() io.WriteString(h, key) key = fmt.Sprintf("%x", h.Sum(nil)[:]) Loading Loading @@ -164,7 +164,7 @@ func Random(w http.ResponseWriter, r *http.Request) { } func RandomColor(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") colorId, err := strconv.ParseInt(id, 0, 64) if err != nil { colorId = 0 Loading Loading @@ -199,7 +199,7 @@ func RandomMirror(w http.ResponseWriter, r *http.Request) { } func RandomMirrorColor(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") colorId, err := strconv.ParseInt(id, 0, 64) if err != nil { colorId = 0 Loading
controllers/squares/random.go +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ func Random(w http.ResponseWriter, r *http.Request) { // handler for "/squares/random/:colorId" // generates a grid random image with a specific color based on the colorMap func RandomColor(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") if colorId, err := strconv.ParseInt(id, 0, 64); err != nil { log.Printf("error when extracting permalink id: %v", err) } else { Loading
controllers/squares/square.go +3 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ import ( // Square is the handler for /squares/:key // builds a 6x6 grid with alternate colors based on the number passed in the url. func Square(w http.ResponseWriter, r *http.Request) { key := route.Context.Get(r, "key") key, _ := route.Context.Get(r, "key") h := md5.New() io.WriteString(h, key) key = fmt.Sprintf("%x", h.Sum(nil)[:]) Loading Loading @@ -61,13 +61,13 @@ func Square(w http.ResponseWriter, r *http.Request) { // build a 6x6 grid with alternate colors based on the number passed in the url func Color(w http.ResponseWriter, r *http.Request) { id := route.Context.Get(r, "colorId") id, _ := route.Context.Get(r, "colorId") colorId, err := strconv.ParseInt(id, 0, 64) if err != nil { colorId = 0 } key := route.Context.Get(r, "key") key, _ := route.Context.Get(r, "key") h := md5.New() io.WriteString(h, key) key = fmt.Sprintf("%x", h.Sum(nil)[:]) Loading