Skip to content

Commit

Permalink
chore: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Oct 15, 2023
1 parent a761906 commit c271b85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charger/ocpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"math"
"slices"
"sort"
"strconv"
"strings"
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c271b85

Please sign in to comment.