Closed frednesto closed 8 months ago
Running go vet ./..., we get :
go vet ./...
github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test ocpp1.6_test/cancel_reservation_test.go:53:42: call of suite.chargePoint.SetReservationHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointReservationListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/clear_charging_profile_test.go:67:44: call of suite.chargePoint.SetSmartChargingHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointSmartChargingListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/diagnostics_status_notification_test.go:49:51: call of suite.centralSystem.SetFirmwareManagementHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockCentralSystemFirmwareManagementListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/firmware_status_notification_test.go:49:51: call of suite.centralSystem.SetFirmwareManagementHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockCentralSystemFirmwareManagementListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/get_composite_schedule_test.go:78:44: call of suite.chargePoint.SetSmartChargingHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointSmartChargingListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/get_diagnostics_test.go:74:49: call of suite.chargePoint.SetFirmwareManagementHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointFirmwareManagementListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/get_local_list_version_test.go:50:44: call of suite.chargePoint.SetLocalAuthListHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointLocalAuthListListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:182:9: GetFeatureName passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockFeature contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:186:9: GetRequestType passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockFeature contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:190:9: GetResponseType passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockFeature contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:194:9: GetFeatureName passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockRequest contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:198:9: GetFeatureName passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockConfirmation contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:340:29: OnGetLocalListVersion passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointLocalAuthListListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:346:29: OnSendLocalList passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointLocalAuthListListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:357:24: OnDiagnosticsStatusNotification passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockCentralSystemFirmwareManagementListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:363:24: OnFirmwareStatusNotification passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockCentralSystemFirmwareManagementListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:374:24: OnGetDiagnostics passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointFirmwareManagementListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:380:24: OnUpdateFirmware passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointFirmwareManagementListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:396:27: OnReserveNow passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointReservationListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:402:27: OnCancelReservation passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointReservationListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:418:29: OnTriggerMessage passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointRemoteTriggerListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:434:29: OnSetChargingProfile passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointSmartChargingListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:440:29: OnClearChargingProfile passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointSmartChargingListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/ocpp16_test.go:446:29: OnGetCompositeSchedule passes lock by value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointSmartChargingListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/reserve_now_test.go:72:42: call of suite.chargePoint.SetReservationHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointReservationListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/send_local_list_test.go:85:44: call of suite.chargePoint.SetLocalAuthListHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointLocalAuthListListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/set_charging_profile_test.go:94:44: call of suite.chargePoint.SetSmartChargingHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointSmartChargingListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/trigger_message_test.go:58:44: call of suite.chargePoint.SetRemoteTriggerHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointRemoteTriggerListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex ocpp1.6_test/update_firmware_test.go:65:49: call of suite.chargePoint.SetFirmwareManagementHandler copies lock value: github.com/lorenzodonini/ocpp-go/ocpp1.6_test_test.MockChargePointFirmwareManagementListener contains github.com/stretchr/testify/mock.Mock contains sync.Mutex
Fix proposed here: https://github.com/lorenzodonini/ocpp-go/pull/254
Thanks for the contribution, I accepted the PR and therefore closing the issue 👍
Description
Running
go vet ./...
, we get :Acceptance Criteria
go vet ./...
return 0 problems