Skip to content

Commit

Permalink
Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Aug 27, 2024
1 parent 330aad8 commit 9e534cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions features/internal/electricalconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (e *ElectricalConnectionCommon) GetPermittedValueDataForFilter(
var resultMin, resultMax, resultDefault float64

for _, set := range data[0].PermittedValueSet {
if set.Value != nil && len(set.Value) > 0 {
if len(set.Value) > 0 {
resultDefault = set.Value[0].GetValue()
}
if set.Range != nil {
Expand Down Expand Up @@ -247,12 +247,12 @@ func (e *ElectricalConnectionCommon) AdjustValueToBeWithinPermittedValuesForPara

for _, element := range data[0].PermittedValueSet {
// is a value set
if element.Value != nil && len(element.Value) > 0 {
if len(element.Value) > 0 {
defaultValue = element.Value[0].GetValue()
hasDefaultValue = true
}
// is a range set
if element.Range != nil && len(element.Range) > 0 {
if len(element.Range) > 0 {
if element.Range[0].Min != nil {
minValue = element.Range[0].Min.GetValue()
}
Expand Down
2 changes: 1 addition & 1 deletion usecases/cem/cevc/public_scen1.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (e *CEVC) ChargeStrategy(entity spineapi.EntityRemoteInterface) ucapi.EVCha
}

// without time series slots, there is no known strategy
if data[0].TimeSeriesSlot == nil || len(data[0].TimeSeriesSlot) == 0 {
if len(data[0].TimeSeriesSlot) == 0 {
return ucapi.EVChargeStrategyTypeUnknown
}

Expand Down
2 changes: 1 addition & 1 deletion usecases/cem/evcc/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (e *EVCC) ChargingPowerLimits(entity spineapi.EntityRemoteInterface) (float
if dataSet[0].PermittedValueSet[0].Range[0].Max != nil {
maxValue = dataSet[0].PermittedValueSet[0].Range[0].Max.GetValue()
}
if dataSet[0].PermittedValueSet[0].Value != nil && len(dataSet[0].PermittedValueSet[0].Value) > 0 {
if len(dataSet[0].PermittedValueSet[0].Value) > 0 {
standByValue = dataSet[0].PermittedValueSet[0].Value[0].GetValue()
}

Expand Down

0 comments on commit 9e534cd

Please sign in to comment.