summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-11-27 12:24:55 -0500
committerSam Anthony <sam@samanthony.xyz>2024-11-27 12:24:55 -0500
commitc8dc62ea99df5fc9f90f11757427492883b43181 (patch)
treefdd8973a2bda243ad98fef24012d3b4ff58aad1f
parent99815be7b96d80430285cb946363643b0ae18bf0 (diff)
downloadsoen422-c8dc62ea99df5fc9f90f11757427492883b43181.zip
server: gofmt
-rw-r--r--server/chart.go10
-rw-r--r--server/server.go4
2 files changed, 7 insertions, 7 deletions
diff --git a/server/chart.go b/server/chart.go
index b6c0471..f37e6ca 100644
--- a/server/chart.go
+++ b/server/chart.go
@@ -1,14 +1,14 @@
package main
import (
+ "fmt"
+ "github.com/wcharczuk/go-chart/v2"
"log"
"net/http"
- "fmt"
- "time"
- "sync"
"slices"
"strings"
- "github.com/wcharczuk/go-chart/v2"
+ "sync"
+ "time"
)
type ChartHandler struct {
@@ -89,7 +89,7 @@ func buildSeries(room RoomID, in <-chan Entry[Humidity], out chan<- chart.TimeSe
y = append(y, float64(e.v))
}
out <- chart.TimeSeries{
- Name: string(room),
+ Name: string(room),
XValues: x,
YValues: y,
}
diff --git a/server/server.go b/server/server.go
index 8cfb1b0..0850b60 100644
--- a/server/server.go
+++ b/server/server.go
@@ -8,8 +8,8 @@ import (
)
const (
- addr = ":9090"
- historySize = 10000 // Number of old samples to keep in memory.
+ addr = ":9090"
+ historySize = 10000 // Number of old samples to keep in memory.
targetHumidityDefault = 35.0
)