mirror of
https://github.com/Xevion/go-ha.git
synced 2026-01-31 00:24:22 -06:00
chore: update carbon pkg to v2 latest, bump version
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ type EnabledDisabledInfo struct {
|
||||
}
|
||||
|
||||
var (
|
||||
currentVersion = "0.7.0"
|
||||
currentVersion = "0.7.1"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+2
-2
@@ -5,11 +5,11 @@ import (
|
||||
"log/slog"
|
||||
"time"
|
||||
|
||||
"github.com/golang-module/carbon"
|
||||
"github.com/dromara/carbon/v2"
|
||||
)
|
||||
|
||||
// Parses a HH:MM string.
|
||||
func ParseTime(s string) carbon.Carbon {
|
||||
func ParseTime(s string) *carbon.Carbon {
|
||||
t, err := time.Parse("15:04", s)
|
||||
if err != nil {
|
||||
parsingErr := fmt.Errorf("failed to parse time string \"%s\"; format must be HH:MM.: %w", s, err)
|
||||
|
||||
Reference in New Issue
Block a user