chore: remove go-funk
Some checks failed
Release / call-build-workflow (push) Has been cancelled
Release / Publish Docker :release (push) Has been cancelled
Release / Publish Github & APT release (push) Has been cancelled

This commit is contained in:
andig 2022-04-03 12:04:23 +02:00
parent f7308513a7
commit a29e79494e
2 changed files with 4 additions and 4 deletions

2
go.mod
View file

@ -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

View file

@ -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