From c7566a26e662f8796a0119977baef38affd8e401 Mon Sep 17 00:00:00 2001 From: andig Date: Tue, 9 Aug 2022 21:59:18 +0200 Subject: [PATCH] chore: fix doc comments for 1.19 --- charger/easee/observationid_enumer.go | 1 - charger/eebus.go | 3 --- cmd/configure/helper.go | 3 +-- server/http.go | 3 ++- vehicle/helper.go | 4 ++-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/charger/easee/observationid_enumer.go b/charger/easee/observationid_enumer.go index 1221a316e..06746c7eb 100644 --- a/charger/easee/observationid_enumer.go +++ b/charger/easee/observationid_enumer.go @@ -1,6 +1,5 @@ // Code generated by "enumer -type ObservationID"; DO NOT EDIT. -// package easee import ( diff --git a/charger/eebus.go b/charger/eebus.go index 3c9de30dc..9b3fbe458 100644 --- a/charger/eebus.go +++ b/charger/eebus.go @@ -247,9 +247,6 @@ func (c *EEBus) Enabled() (bool, error) { } // Enable implements the api.Charger interface -// enable -// true: allow to EV to draw power -// false: do not allow the EV to draw power func (c *EEBus) Enable(enable bool) error { data, err := c.cc.GetData() if err != nil { diff --git a/cmd/configure/helper.go b/cmd/configure/helper.go index 4c9b4d993..47f5bbe32 100644 --- a/cmd/configure/helper.go +++ b/cmd/configure/helper.go @@ -394,8 +394,7 @@ func (c *CmdConfigure) paramChoiceValues(params []templates.Param, name string) } // processConfig processes an EVCC configuration item -// Returns: -// a map with param name and values +// Returns a map with param name and values func (c *CmdConfigure) processConfig(templateItem *templates.Template, deviceCategory DeviceCategory) map[string]interface{} { fmt.Println() fmt.Println(c.localizedString("Config_Title", nil)) diff --git a/server/http.go b/server/http.go index 7aba840bb..80efbaed8 100644 --- a/server/http.go +++ b/server/http.go @@ -21,8 +21,9 @@ type route struct { HandlerFunc http.HandlerFunc } -//lint:ignore U1000 if needed // routeLogger traces matched routes including their executing time +// +//lint:ignore U1000 if needed func routeLogger(inner http.Handler) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { start := time.Now() diff --git a/vehicle/helper.go b/vehicle/helper.go index ad5ae957b..b2a79b7a7 100644 --- a/vehicle/helper.go +++ b/vehicle/helper.go @@ -5,7 +5,7 @@ import ( "strings" ) -// ensureVehicleWithFeature extracts VIN from list of VINs returned from `list`` function +// ensureVehicleWithFeature extracts VIN from list of VINs returned from `list` function func ensureVehicle(vin string, list func() ([]string, error)) (string, error) { vin, _, err := ensureVehicleWithFeature(vin, list, func(v string) (string, string) { return v, "" @@ -14,7 +14,7 @@ func ensureVehicle(vin string, list func() ([]string, error)) (string, error) { return vin, err } -// ensureVehicleWithFeature extracts VIN and feature from list of vehicles of type V returned from `list`` function +// ensureVehicleWithFeature extracts VIN and feature from list of vehicles of type V returned from `list` function func ensureVehicleWithFeature[Vehicle, Feature any]( vin string, list func() ([]Vehicle, error),