File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -76,23 +76,20 @@ func (p *Profile) Validate() (err error) {
7676
7777func (p * Profile ) GetHosts () (hosts []Host ) {
7878 hosts = []Host {}
79- index := 0
8079 known := []string {}
8180 for _ , host := range p .Receive .Hosts {
8281 if slices .Contains (known , host .Protocol + host .Address + host .Port ) {
8382 continue
8483 }
8584 known = append (known , host .Protocol + host .Address + host .Port )
86- hosts [index ] = host
87- index ++
85+ hosts = append (hosts , host )
8886 }
8987 for _ , host := range p .Respond .Hosts {
9088 if slices .Contains (known , host .Protocol + host .Address + host .Port ) {
9189 continue
9290 }
9391 known = append (known , host .Protocol + host .Address + host .Port )
94- hosts [index ] = host
95- index ++
92+ hosts = append (hosts , host )
9693 }
9794 return hosts
9895}
You can’t perform that action at this time.
0 commit comments