From ca8aae2dc5e444dace03f584149e9307041cc37d Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 16 Feb 2026 17:40:22 +0100 Subject: [PATCH] chore: minor --- vehicle/bmw/cardata/provider.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vehicle/bmw/cardata/provider.go b/vehicle/bmw/cardata/provider.go index 97098ae14..1cd37b24c 100644 --- a/vehicle/bmw/cardata/provider.go +++ b/vehicle/bmw/cardata/provider.go @@ -11,7 +11,6 @@ import ( "github.com/evcc-io/evcc/api" "github.com/evcc-io/evcc/util" - "github.com/samber/lo" "github.com/spf13/cast" "golang.org/x/oauth2" ) @@ -72,10 +71,10 @@ func (v *Provider) findOrCreateContainer() (string, error) { return "", err } - if cc := lo.Filter(containers, func(c Container, _ int) bool { + if i := slices.IndexFunc(containers, func(c Container) bool { return c.Name == "evcc.io" && c.Purpose == requiredVersion - }); len(cc) > 0 { - return cc[0].ContainerId, nil + }); i >= 0 { + return containers[i].ContainerId, nil } res, err := v.api.CreateContainer(CreateContainer{