renamed to example package to allow correct build

This commit is contained in:
Jiri Luzny
2023-11-15 03:35:36 +01:00
parent 7aa407a515
commit 5b1ee13fa3
3 changed files with 3 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
package main package example
import ( import (
"encoding/json" "encoding/json"
@@ -15,7 +15,6 @@ func main() {
HAAuthToken: os.Getenv("HA_AUTH_TOKEN"), HAAuthToken: os.Getenv("HA_AUTH_TOKEN"),
HomeZoneEntityId: "zone.home", HomeZoneEntityId: "zone.home",
}) })
if err != nil { if err != nil {
log.Fatalln("Error connecting to HASS:", err) log.Fatalln("Error connecting to HASS:", err)
} }
@@ -51,7 +50,6 @@ func main() {
app.RegisterEventListeners(zwaveEventListener) app.RegisterEventListeners(zwaveEventListener)
app.Start() app.Start()
} }
func pantryLights(service *ga.Service, state ga.State, sensor ga.EntityData) { func pantryLights(service *ga.Service, state ga.State, sensor ga.EntityData) {

View File

@@ -1,4 +1,4 @@
package main package example
import ( import (
"log/slog" "log/slog"

View File

@@ -1,4 +1,4 @@
module main module example
go 1.21.0 go 1.21.0