Loading app-backend/colors.go +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ import ( "image/color" ) // MapOfColorPatterns is used to build random images with colors that combine together. func MapOfColorPatterns() map[int][]color.RGBA { return map[int][]color.RGBA{ 0: []color.RGBA{ Loading app-backend/randomgrid.go +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ import ( "net/http" ) // handler for /gird/random. // handler for "/gird/random" // generates a black and white grid random image. func gridRandomHandler(w http.ResponseWriter, r *http.Request) { m := image.NewRGBA(image.Rect(0, 0, 240, 240)) Loading @@ -18,7 +18,7 @@ func gridRandomHandler(w http.ResponseWriter, r *http.Request) { writeImage(w, &img) } // handler for /grid/random/[0-9] // handler for "/grid/random/[0-9]" // generates a grid random image with a specific color based on the colorMap func gridRandomColorHandler(w http.ResponseWriter, r *http.Request) { intID, err := PermalinkID(r, 3) Loading app-backend/utils.go +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ import ( "strings" ) // parse permalink id from URL and return it // PermalinkID parses an URL and extracts the id from URL and returns it. func PermalinkID(r *http.Request, level int64) (int64, error) { url := strings.Replace(r.URL.String(), "http://", "", 1) path := strings.Split(url, "/") Loading Loading
app-backend/colors.go +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ import ( "image/color" ) // MapOfColorPatterns is used to build random images with colors that combine together. func MapOfColorPatterns() map[int][]color.RGBA { return map[int][]color.RGBA{ 0: []color.RGBA{ Loading
app-backend/randomgrid.go +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ import ( "net/http" ) // handler for /gird/random. // handler for "/gird/random" // generates a black and white grid random image. func gridRandomHandler(w http.ResponseWriter, r *http.Request) { m := image.NewRGBA(image.Rect(0, 0, 240, 240)) Loading @@ -18,7 +18,7 @@ func gridRandomHandler(w http.ResponseWriter, r *http.Request) { writeImage(w, &img) } // handler for /grid/random/[0-9] // handler for "/grid/random/[0-9]" // generates a grid random image with a specific color based on the colorMap func gridRandomColorHandler(w http.ResponseWriter, r *http.Request) { intID, err := PermalinkID(r, 3) Loading
app-backend/utils.go +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ import ( "strings" ) // parse permalink id from URL and return it // PermalinkID parses an URL and extracts the id from URL and returns it. func PermalinkID(r *http.Request, level int64) (int64, error) { url := strings.Replace(r.URL.String(), "http://", "", 1) path := strings.Split(url, "/") Loading