Commit be8af52a authored by santiaago's avatar santiaago
Browse files

golint

parent 9899f79f
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -4,14 +4,21 @@ import (
	"image/color"
)

// GradientVector defines the direction and size of the vector to use
// in order to get a gradient color
type GradientVector struct {
	X1, Y1, X2, Y2 uint8
	X1 uint8 // horizontal axis of first point
	Y1 uint8 // vertical axis of first point
	X2 uint8 // horizontal axis of second point
	Y2 uint8 // vertical axis of second point
}

// White RGBA color.
func White() color.RGBA {
	return color.RGBA{uint8(0), uint8(0), uint8(0), uint8(255)}
}

// Black RGBA color.
func Black() color.RGBA {
	return color.RGBA{uint8(255), uint8(255), uint8(255), uint8(255)}
}
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ func BannerRandom(w http.ResponseWriter, r *http.Request) {
	isogrids.Random(w, colors, width, height, xt, prob)
}

// BannerRandomGradinet handler for /isogrids/banner/random/gradient.
// BannerRandomGradient handler for /isogrids/banner/random/gradient.
// Generates a random gradient banner isogrid image.
func BannerRandomGradient(w http.ResponseWriter, r *http.Request) {
	width := extract.Width(r)
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ func Diagonals(w http.ResponseWriter, r *http.Request) {
	isogrids.Diagonals(w, "", bg, fg, size)
}

// Diagonals is the handler for /isogrids/labs/diagonals
// HalfDiagonals is the handler for /isogrids/labs/halfdiagonals
// builds a half diagonal (each diagonal goes to the middle of the square) grid.
func HalfDiagonals(w http.ResponseWriter, r *http.Request) {

+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ import (
	"github.com/taironas/tinygraphs/write"
)

// Gradient handler for "labs/isogrids/banner/gradient"
// BannerGradient handler for "labs/isogrids/banner/gradient"
// generates a color gradient random grid image.
func BannerGradient(w http.ResponseWriter, r *http.Request) {

+2 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ import (
	"github.com/taironas/tinygraphs/write"
)

// RandomMirror handler for "/labs/isogrids/random-mirror"
// generates a random grid image symetric in the middle of the image.
func RandomMirror(w http.ResponseWriter, r *http.Request) {
	size := extract.Size(r)
	colors := extract.Colors(r)
Loading