few things:

- easy comparison of hourMinute with .int()
- created Sunset/Sunrise vars of type hourMinute for easy end-user use
This commit is contained in:
Sam Lewis
2022-10-10 00:11:41 -04:00
parent 2597711973
commit 25a843fc7b
4 changed files with 48 additions and 25 deletions

View File

@@ -18,7 +18,7 @@ type AuthMessage struct {
func WriteMessage[T any](msg T, conn *websocket.Conn, ctx context.Context) error {
msgJson, err := json.Marshal(msg)
fmt.Println(string(msgJson))
// fmt.Println(string(msgJson))
if err != nil {
return err
}
@@ -97,7 +97,6 @@ func VerifyAuthResponse(conn *websocket.Conn, ctx context.Context) error {
var authResp authResponse
json.Unmarshal(msg, &authResp)
fmt.Println(authResp)
if authResp.MsgType != "auth_ok" {
return errors.New("invalid auth token")
}