From c271b857df8e5fc9ae3277f60ac90baffafa27b5 Mon Sep 17 00:00:00 2001 From: andig Date: Sun, 15 Oct 2023 09:56:27 +0200 Subject: [PATCH] chore: simplify --- charger/ocpp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charger/ocpp.go b/charger/ocpp.go index 74f34cd262..2e891905fb 100644 --- a/charger/ocpp.go +++ b/charger/ocpp.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "math" + "slices" "sort" "strconv" "strings" @@ -16,7 +17,6 @@ import ( "github.com/lorenzodonini/ocpp-go/ocpp1.6/core" "github.com/lorenzodonini/ocpp-go/ocpp1.6/smartcharging" "github.com/lorenzodonini/ocpp-go/ocpp1.6/types" - "github.com/samber/lo" ) // OCPP charger implementation @@ -276,7 +276,7 @@ func NewOCPP(id string, connector int, idtag string, // hasMeasurement checks if meterValuesSample contains given measurement func (c *OCPP) hasMeasurement(val types.Measurand) bool { - return lo.Contains(strings.Split(c.meterValuesSample, ","), string(val)) + return slices.Contains(strings.Split(c.meterValuesSample, ","), string(val)) } // configure updates CP configuration