Skip to content

Commit 6e53f8b

Browse files
committed
go fmt
1 parent b652069 commit 6e53f8b

2 files changed

Lines changed: 17 additions & 18 deletions

File tree

usecases/api/types.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ const (
1919

2020
type OptionalPowerConsumptionInfo struct {
2121
PowerSequenceId model.PowerSequenceIdType
22-
Power *float64
23-
MaxPower *float64
24-
State model.PowerSequenceStateType
25-
IsPausable bool
26-
IsStoppable bool
27-
StartTime *time.Time
22+
Power *float64
23+
MaxPower *float64
24+
State model.PowerSequenceStateType
25+
IsPausable bool
26+
IsStoppable bool
27+
StartTime *time.Time
2828
}
2929

3030
// manufacturer data type

usecases/cem/ohpcf/public.go

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (o *OHPCF) OptionalPowerConsumption(entity spineapi.EntityRemoteInterface)
3333
if len(alt[0].PowerSequence) == 0 {
3434
return nil, fmt.Errorf("%s(alternative attribute present but no power sequence defined)", remoteDataStructureError)
3535
}
36-
36+
3737
seq := alt[0].PowerSequence[0]
3838
if seq.Description == nil || seq.Description.SequenceId == nil {
3939
return nil, fmt.Errorf("%s(alternative attribute present but no power sequenceId defined)", remoteDataStructureError)
@@ -42,7 +42,7 @@ func (o *OHPCF) OptionalPowerConsumption(entity spineapi.EntityRemoteInterface)
4242
if seq.State == nil || seq.State.State == nil {
4343
return nil, fmt.Errorf("%s(alternative attribute present but no power sequence state defined)", remoteDataStructureError)
4444
}
45-
45+
4646
if seq.OperatingConstraintsInterrupt == nil {
4747
return nil, fmt.Errorf("%s(alternative attribute present but no power sequence operating interrupt constraints defined)", remoteDataStructureError)
4848
}
@@ -91,19 +91,18 @@ func (o *OHPCF) OptionalPowerConsumption(entity spineapi.EntityRemoteInterface)
9191
}
9292

9393
info := ucapi.OptionalPowerConsumptionInfo{
94-
PowerSequenceId: seqId,
95-
Power: power,
96-
MaxPower: maxPower,
97-
State: *seq.State.State, // safe to dereference because we validate above
98-
IsPausable: isPausable,
99-
IsStoppable: isStoppable,
100-
StartTime: startTime,
94+
PowerSequenceId: seqId,
95+
Power: power,
96+
MaxPower: maxPower,
97+
State: *seq.State.State, // safe to dereference because we validate above
98+
IsPausable: isPausable,
99+
IsStoppable: isStoppable,
100+
StartTime: startTime,
101101
}
102102

103103
return &info, nil
104104
}
105105

106-
107106
// The availability of an optional consumption of power [OHPCF-011/1].
108107
//
109108
// return true if the optional consumption of power is available
@@ -322,7 +321,7 @@ func (o *OHPCF) AbortPowerConsumptionProcess(entity spineapi.EntityRemoteInterfa
322321
if err != nil {
323322
return nil, err
324323
}
325-
324+
326325
data := &model.SmartEnergyManagementPsDataType{
327326
Alternatives: []model.SmartEnergyManagementPsAlternativesType{{
328327
PowerSequence: []model.SmartEnergyManagementPsPowerSequenceType{{
@@ -368,7 +367,7 @@ func (o *OHPCF) ResumePowerConsumptionProcess(entity spineapi.EntityRemoteInterf
368367
if err != nil {
369368
return nil, err
370369
}
371-
370+
372371
data := &model.SmartEnergyManagementPsDataType{
373372
Alternatives: []model.SmartEnergyManagementPsAlternativesType{{
374373
PowerSequence: []model.SmartEnergyManagementPsPowerSequenceType{{

0 commit comments

Comments
 (0)