From a29e79494e557655f8b3f89cad0b1fa4ee5322bb Mon Sep 17 00:00:00 2001 From: andig Date: Sun, 3 Apr 2022 12:04:23 +0200 Subject: [PATCH] chore: remove go-funk --- go.mod | 2 +- vehicle/audi/etron/api.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 8edaef3cd..3ed262b76 100644 --- a/go.mod +++ b/go.mod @@ -147,7 +147,7 @@ require ( github.com/spf13/cast v1.4.1 // indirect github.com/subosito/gotenv v1.2.0 // indirect github.com/teivah/onecontext v1.3.0 // indirect - github.com/thoas/go-funk v0.9.1 + github.com/thoas/go-funk v0.9.1 // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.opencensus.io v0.23.0 // indirect diff --git a/vehicle/audi/etron/api.go b/vehicle/audi/etron/api.go index ed5333e56..2f27af1ef 100644 --- a/vehicle/audi/etron/api.go +++ b/vehicle/audi/etron/api.go @@ -5,8 +5,8 @@ import ( "github.com/evcc-io/evcc/util" "github.com/evcc-io/evcc/util/request" + "github.com/samber/lo" "github.com/shurcooL/graphql" - "github.com/thoas/go-funk" "golang.org/x/oauth2" ) @@ -45,9 +45,9 @@ func (v *API) Vehicles(ctx context.Context) ([]string, error) { var vins []string err := v.client.Query(ctx, &res, nil) if err == nil { - vins = funk.Map(res.UserVehicles, func(v vehicle) string { + vins = lo.Map(res.UserVehicles, func(v vehicle, _ int) string { return v.VIN - }).([]string) + }) } return vins, err