diff --git a/bin/main.go b/bin/main.go index d16f447..3f8b474 100644 --- a/bin/main.go +++ b/bin/main.go @@ -22,7 +22,7 @@ func main() { freq = append(freq, rand.Int()) } w.Header().Add("Content-Type", "text/html") - svg := graph.GetWeekImage(freq) + svg := graph.GetWeekSVG(freq) svg.WriteTo(w) }) @@ -31,7 +31,7 @@ func main() { for i := 0; i < 365; i++ { freq = append(freq, rand.Int()) } - svg := graph.GetYearImage(freq) + svg := graph.GetYearSVG(freq) w.Header().Add("Content-Type", "text/html") svg.WriteTo(w) diff --git a/graph/graph.go b/graph/graph.go index 7c3fa85..090c54c 100644 --- a/graph/graph.go +++ b/graph/graph.go @@ -51,7 +51,7 @@ func ColorForFrequency(freq, min, max int) sc.SimpleColor { } return colorScheme[colorIndex] } -func GetWeekImage(frequencies []int) bytes.Buffer { +func GetWeekSVG(frequencies []int) bytes.Buffer { squareColors := []sc.SimpleColor{} min, max := minmax(frequencies) for _, f := range frequencies { @@ -76,7 +76,7 @@ func drawWeekImage(c []sc.SimpleColor) bytes.Buffer { sbw.Flush() return sb } -func GetYearImage(frequencies []int) bytes.Buffer { +func GetYearSVG(frequencies []int) bytes.Buffer { squareColors := []sc.SimpleColor{} min, max := minmax(frequencies) for _, f := range frequencies {