Skip to content

Commit 91ad41d

Browse files
authored
chore: use Go 1.24 (evcc-io#17656)
1 parent 3020e1a commit 91ad41d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+91
-118
lines changed

.github/workflows/default.yml

-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Default
22

3-
env:
4-
GO_VERSION: ^1.23
5-
63
on:
74
push:
85
branches:
@@ -20,7 +17,6 @@ jobs:
2017

2118
- uses: actions/setup-go@v5
2219
with:
23-
go-version: ${{ env.GO_VERSION }}
2420
cache: false
2521
id: go
2622

@@ -58,7 +54,6 @@ jobs:
5854

5955
- uses: actions/setup-go@v5
6056
with:
61-
go-version: ${{ env.GO_VERSION }}
6257
cache: false
6358
id: go
6459

@@ -91,7 +86,6 @@ jobs:
9186

9287
- uses: actions/setup-go@v5
9388
with:
94-
go-version: ${{ env.GO_VERSION }}
9589
cache: false
9690
id: go
9791

@@ -117,7 +111,6 @@ jobs:
117111

118112
- uses: actions/setup-go@v5
119113
with:
120-
go-version: ${{ env.GO_VERSION }}
121114
cache: false # avoid cache thrashing
122115
id: go
123116

@@ -183,7 +176,6 @@ jobs:
183176

184177
- uses: actions/setup-go@v5
185178
with:
186-
go-version: ${{ env.GO_VERSION }}
187179
cache: false
188180
id: go
189181

.github/workflows/documentation.yml

-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Deploy updated templates
22

3-
env:
4-
GO_VERSION: ^1.23
5-
63
on:
74
schedule:
85
- cron: "0 2 * * *" # same time as nightly is triggered
@@ -20,7 +17,6 @@ jobs:
2017

2118
- uses: actions/setup-go@v5
2219
with:
23-
go-version: ${{ env.GO_VERSION }}
2420
id: go
2521

2622
- name: Build docs

.github/workflows/nightly.yml

-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Nightly Build
22

3-
env:
4-
GO_VERSION: ^1.23
5-
63
on:
74
schedule: # runs on the default branch: master
85
- cron: "0 2 * * *" # run at 2 AM UTC
@@ -84,7 +81,6 @@ jobs:
8481

8582
- uses: actions/setup-go@v5
8683
with:
87-
go-version: ${{ env.GO_VERSION }}
8884
id: go
8985

9086
- name: Patch ASN1

.github/workflows/release.yml

-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Release
22

3-
env:
4-
GO_VERSION: ^1.23
5-
63
on:
74
push:
85
tags:
@@ -64,7 +61,6 @@ jobs:
6461
- name: Setup Go
6562
uses: actions/setup-go@v5
6663
with:
67-
go-version: ${{ env.GO_VERSION }}
6864
id: go
6965

7066
- name: Patch ASN1

.github/workflows/website.yml

-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: Deploy data to website
22

3-
env:
4-
GO_VERSION: ^1.23
5-
63
on:
74
release:
85
types: [created]
@@ -18,7 +15,6 @@ jobs:
1815

1916
- uses: actions/setup-go@v5
2017
with:
21-
go-version: ${{ env.GO_VERSION }}
2218
id: go
2319

2420
- name: Build docs

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
run:
2-
go: "1.23"
2+
go: "1.24"
33

44
issues:
55
exclude:

.goreleaser-nightly.yml

-8
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@ builds:
3333
flags:
3434
- -trimpath
3535
- -tags=release,timetzdata
36-
- goos: darwin
37-
goarch: arm64
38-
ldflags:
39-
- -X github.com/evcc-io/evcc/server.Version={{ .Tag }} -X github.com/evcc-io/evcc/server.Commit={{ .ShortCommit }} -s -w -B gobuildid
40-
- goos: darwin
41-
goarch: amd64
42-
ldflags:
43-
- -X github.com/evcc-io/evcc/server.Version={{ .Tag }} -X github.com/evcc-io/evcc/server.Commit={{ .ShortCommit }} -s -w -B gobuildid
4436

4537
archives:
4638
- builds:

.goreleaser.yml

-8
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ builds:
3838
flags:
3939
- -trimpath
4040
- -tags=release,timetzdata
41-
- goos: darwin
42-
goarch: arm64
43-
ldflags:
44-
- -X github.com/evcc-io/evcc/server.Version={{ .Version }} -s -w -B gobuildid
45-
- goos: darwin
46-
goarch: amd64
47-
ldflags:
48-
- -X github.com/evcc-io/evcc/server.Version={{ .Version }} -s -w -B gobuildid
4941

5042
env:
5143
- CGO_ENABLED=0

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN make ui
2020

2121

2222
# STEP 2 build executable binary
23-
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder
23+
FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS builder
2424

2525
# Install git + SSL ca certificates.
2626
# Git is required for fetching the dependencies.

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ clean::
3737
rm -rf dist/
3838

3939
install::
40-
go install $$(go list -e -f '{{join .Imports " "}}' tools.go)
40+
go install tool
4141

4242
install-ui::
4343
npm ci

api/api.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"time"
88
)
99

10-
//go:generate mockgen -package api -destination mock.go github.com/evcc-io/evcc/api Charger,ChargeState,CurrentLimiter,CurrentGetter,PhaseSwitcher,PhaseGetter,Identifier,Meter,MeterEnergy,PhaseCurrents,Vehicle,ChargeRater,Battery,Tariff,BatteryController,Circuit
10+
//go:generate go tool mockgen -package api -destination mock.go github.com/evcc-io/evcc/api Charger,ChargeState,CurrentLimiter,CurrentGetter,PhaseSwitcher,PhaseGetter,Identifier,Meter,MeterEnergy,PhaseCurrents,Vehicle,ChargeRater,Battery,Tariff,BatteryController,Circuit
1111

1212
// Meter provides total active power in W
1313
type Meter interface {

api/batterymode.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package api
33
// BatteryMode is the home battery operation mode. Valid values are normal, locked and charge
44
type BatteryMode int
55

6-
//go:generate enumer -type BatteryMode -trimprefix Battery -transform=lower
6+
//go:generate go tool enumer -type BatteryMode -trimprefix Battery -transform=lower
77
const (
88
BatteryUnknown BatteryMode = iota
99
BatteryNormal

api/feature.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package api
22

33
type Feature int
44

5-
//go:generate enumer -type Feature -text
5+
//go:generate go tool enumer -type Feature -text
66
const (
77
_ Feature = iota
88
Offline

api/reason.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package api
22

33
type Reason int
44

5-
//go:generate enumer -type Reason -trimprefix Reason -transform=lower
5+
//go:generate go tool enumer -type Reason -trimprefix Reason -transform=lower
66
const (
77
ReasonUnknown Reason = iota
88
ReasonWaitingForAuthorization

api/tariff.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package api
22

3-
//go:generate enumer -type TariffType -trimprefix TariffType -transform=lower -text
4-
//go:generate enumer -type TariffUsage -trimprefix TariffUsage -transform=lower
3+
//go:generate go tool enumer -type TariffType -trimprefix TariffType -transform=lower -text
4+
//go:generate go tool enumer -type TariffUsage -trimprefix TariffUsage -transform=lower
55

66
type TariffType int
77

charger/abl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func NewABLeMHFromConfig(other map[string]interface{}) (api.Charger, error) {
9696
return NewABLeMH(cc.URI, cc.Device, cc.Comset, cc.Baudrate, cc.ID, cc.Timeout)
9797
}
9898

99-
//go:generate decorate -f decorateABLeMH -b *ABLeMH -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)"
99+
//go:generate go tool decorate -f decorateABLeMH -b *ABLeMH -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)"
100100

101101
// NewABLeMH creates ABLeMH charger
102102
func NewABLeMH(uri, device, comset string, baudrate int, slaveID uint8, timeout time.Duration) (api.Charger, error) {

charger/alfen.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func init() {
5656
registry.AddCtx("alfen", NewAlfenFromConfig)
5757
}
5858

59-
//go:generate decorate -f decorateAlfen -b *Alfen -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
59+
//go:generate go tool decorate -f decorateAlfen -b *Alfen -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
6060

6161
// NewAlfenFromConfig creates a Alfen charger from generic config
6262
func NewAlfenFromConfig(ctx context.Context, other map[string]interface{}) (api.Charger, error) {

charger/amperfied.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func init() {
5858
registry.AddCtx("amperfied", NewAmperfiedFromConfig)
5959
}
6060

61-
//go:generate decorate -f decorateAmperfied -b *Amperfied -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
61+
//go:generate go tool decorate -f decorateAmperfied -b *Amperfied -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
6262

6363
// NewAmperfiedFromConfig creates a Amperfied charger from generic config
6464
func NewAmperfiedFromConfig(ctx context.Context, other map[string]interface{}) (api.Charger, error) {

charger/bender.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func NewBenderCCFromConfig(other map[string]interface{}) (api.Charger, error) {
8484
return NewBenderCC(cc.URI, cc.ID)
8585
}
8686

87-
//go:generate decorate -f decorateBenderCC -b *BenderCC -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.Battery,Soc,func() (float64, error)" -t "api.Identifier,Identify,func() (string, error)"
87+
//go:generate go tool decorate -f decorateBenderCC -b *BenderCC -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.Battery,Soc,func() (float64, error)" -t "api.Identifier,Identify,func() (string, error)"
8888

8989
// NewBenderCC creates BenderCC charger
9090
func NewBenderCC(uri string, id uint8) (api.Charger, error) {

charger/cfos.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func init() {
3737
registry.Add("cfos", NewCfosPowerBrainFromConfig)
3838
}
3939

40-
//go:generate decorate -f decorateCfos -b *CfosPowerBrain -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error"
40+
//go:generate go tool decorate -f decorateCfos -b *CfosPowerBrain -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error"
4141

4242
// NewCfosPowerBrainFromConfig creates a cFos charger from generic config
4343
func NewCfosPowerBrainFromConfig(other map[string]interface{}) (api.Charger, error) {

charger/charger.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func init() {
2424
registry.AddCtx(api.Custom, NewConfigurableFromConfig)
2525
}
2626

27-
//go:generate decorate -f decorateCustom -b *Charger -r api.Charger -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.Identifier,Identify,func() (string, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.Resurrector,WakeUp,func() error" -t "api.Battery,Soc,func() (float64, error)" -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)"
27+
//go:generate go tool decorate -f decorateCustom -b *Charger -r api.Charger -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.Identifier,Identify,func() (string, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.Resurrector,WakeUp,func() error" -t "api.Battery,Soc,func() (float64, error)" -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)"
2828

2929
// NewConfigurableFromConfig creates a new configurable charger
3030
func NewConfigurableFromConfig(ctx context.Context, other map[string]interface{}) (api.Charger, error) {

charger/easee/signalr.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const (
6262
// https://www.notion.so/Charger-template-c6a20ff7cfea41e2b5f80b00afb34af5
6363
type ObservationID int
6464

65-
//go:generate enumer -type ObservationID
65+
//go:generate go tool enumer -type ObservationID
6666
const (
6767
SELF_TEST_RESULT ObservationID = 1 // PASSED or error codes [String]
6868
SELF_TEST_DETAILS ObservationID = 2 // JSON with details from self-test [String]

charger/eebus.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func NewEEBusFromConfig(other map[string]interface{}) (api.Charger, error) {
7171
return NewEEBus(cc.Ski, cc.Ip, cc.Meter, cc.ChargedEnergy, cc.VasVW)
7272
}
7373

74-
//go:generate decorate -f decorateEEBus -b *EEBus -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.ChargeRater,ChargedEnergy,func() (float64, error)"
74+
//go:generate go tool decorate -f decorateEEBus -b *EEBus -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.ChargeRater,ChargedEnergy,func() (float64, error)"
7575

7676
// NewEEBus creates EEBus charger
7777
func NewEEBus(ski, ip string, hasMeter, hasChargedEnergy, vasVW bool) (api.Charger, error) {

charger/em2go.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func init() {
6666
registry.Add("em2go-home", NewEm2GoFromConfig)
6767
}
6868

69-
//go:generate decorate -f decorateEm2Go -b *Em2Go -r api.Charger -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
69+
//go:generate go tool decorate -f decorateEm2Go -b *Em2Go -r api.Charger -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
7070

7171
// NewEm2GoFromConfig creates a Em2Go charger from generic config
7272
func NewEm2GoFromConfig(other map[string]interface{}) (api.Charger, error) {

charger/evsewifi.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func init() {
2727
registry.Add("evsewifi", NewEVSEWifiFromConfig)
2828
}
2929

30-
//go:generate decorate -f decorateEVSE -b *EVSEWifi -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)" -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.Identifier,Identify,func() (string, error)"
30+
//go:generate go tool decorate -f decorateEVSE -b *EVSEWifi -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)" -t "api.ChargerEx,MaxCurrentMillis,func(float64) error" -t "api.Identifier,Identify,func() (string, error)"
3131

3232
// NewEVSEWifiFromConfig creates a EVSEWifi charger from generic config
3333
func NewEVSEWifiFromConfig(other map[string]interface{}) (api.Charger, error) {

charger/go-e.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func init() {
4646
})
4747
}
4848

49-
//go:generate decorate -f decorateGoE -b *GoE -r api.Charger -t "api.ChargeRater,ChargedEnergy,func() (float64, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error"
49+
//go:generate go tool decorate -f decorateGoE -b *GoE -r api.Charger -t "api.ChargeRater,ChargedEnergy,func() (float64, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error"
5050

5151
// newGoEFromConfig creates a go-e charger from generic config
5252
func newGoEFromConfig(v2 bool, other map[string]interface{}) (api.Charger, error) {

charger/hardybarth-salia.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func init() {
5252
registry.AddCtx("hardybarth-salia", NewSaliaFromConfig)
5353
}
5454

55-
//go:generate decorate -f decorateSalia -b *Salia -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
55+
//go:generate go tool decorate -f decorateSalia -b *Salia -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
5656

5757
// NewSaliaFromConfig creates a Salia cPH2 charger from generic config
5858
func NewSaliaFromConfig(ctx context.Context, other map[string]interface{}) (api.Charger, error) {

charger/innogy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func NewInnogyFromConfig(other map[string]interface{}) (api.Charger, error) {
8282
return decorateInnogy(wb, totalEnergy, voltages), nil
8383
}
8484

85-
//go:generate decorate -f decorateInnogy -b *Innogy -r api.Charger -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)"
85+
//go:generate go tool decorate -f decorateInnogy -b *Innogy -r api.Charger -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseVoltages,Voltages,func() (float64, float64, float64, error)"
8686

8787
// NewInnogy creates a Innogy charger
8888
func NewInnogy(uri string, id uint8) (*Innogy, error) {

charger/keba-modbus.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func init() {
6666
registry.AddCtx("keba-modbus", NewKebaFromConfig)
6767
}
6868

69-
//go:generate decorate -f decorateKeba -b *Keba -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.Identifier,Identify,func() (string, error)" -t "api.StatusReasoner,StatusReason,func() (api.Reason, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
69+
//go:generate go tool decorate -f decorateKeba -b *Keba -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)" -t "api.Identifier,Identify,func() (string, error)" -t "api.StatusReasoner,StatusReason,func() (api.Reason, error)" -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)"
7070

7171
// NewKebaFromConfig creates a new Keba ModbusTCP charger
7272
func NewKebaFromConfig(ctx context.Context, other map[string]interface{}) (api.Charger, error) {

charger/keba-udp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func init() {
3232
registry.Add("keba-udp", NewKebaUdpFromConfig)
3333
}
3434

35-
//go:generate decorate -f decorateKebaUdp -b *KebaUdp -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)"
35+
//go:generate go tool decorate -f decorateKebaUdp -b *KebaUdp -r api.Charger -t "api.Meter,CurrentPower,func() (float64, error)" -t "api.MeterEnergy,TotalEnergy,func() (float64, error)" -t "api.PhaseCurrents,Currents,func() (float64, float64, float64, error)"
3636

3737
// NewKebaUdpFromConfig creates a new Keba UDP charger
3838
func NewKebaUdpFromConfig(other map[string]interface{}) (api.Charger, error) {

charger/kse.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func NewKSEFromConfig(other map[string]interface{}) (api.Charger, error) {
7070
return NewKSE(cc.URI, cc.Device, cc.Comset, cc.Baudrate, cc.ID)
7171
}
7272

73-
//go:generate decorate -f decorateKSE -b *KSE -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)" -t "api.Identifier,Identify,func() (string, error)"
73+
//go:generate go tool decorate -f decorateKSE -b *KSE -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error" -t "api.PhaseGetter,GetPhases,func() (int, error)" -t "api.Identifier,Identify,func() (string, error)"
7474

7575
// NewKSE creates KSE charger
7676
func NewKSE(uri, device, comset string, baudrate int, slaveID uint8) (api.Charger, error) {

charger/nrggen2.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func init() {
4848
registry.Add("nrggen2", NewNRGKickGen2FromConfig)
4949
}
5050

51-
//go:generate decorate -f decorateNRGKickGen2 -b *NRGKickGen2 -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error"
51+
//go:generate go tool decorate -f decorateNRGKickGen2 -b *NRGKickGen2 -r api.Charger -t "api.PhaseSwitcher,Phases1p3p,func(int) error"
5252

5353
// NewNRGKickGen2FromConfig creates a NRGKickGen2 charger from generic config
5454
func NewNRGKickGen2FromConfig(other map[string]interface{}) (api.Charger, error) {

0 commit comments

Comments
 (0)