Skip to content

Commit

Permalink
[core] Minor consistency fix
Browse files Browse the repository at this point in the history
  • Loading branch information
teo committed Nov 16, 2023
1 parent 9883278 commit 020b551
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions core/integration/dcs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,19 @@ import (
dcspb "github.com/AliceO2Group/Control/core/integration/dcs/protos"
)

func (detectors DCSDetectors) ToStringSlice() []string {
ret := make([]string, len(detectors))
func (d DCSDetectors) ToStringSlice() (sslice []string) {
if d == nil {
return
}
sslice = make([]string, len(d))
if len(d) == 0 {
return
}

for i, det := range detectors {
ret[i] = det.String()
for i, det := range d {
sslice[i] = det.String()
}
return ret
return
}

func (d DCSDetectors) EcsDetectorsSlice() (sslice []string) {
Expand Down

0 comments on commit 020b551

Please sign in to comment.