Skip to content

Commit

Permalink
Merge pull request #32 from whalechoi/master
Browse files Browse the repository at this point in the history
rename realping result
  • Loading branch information
whalechoi committed Sep 17, 2024
2 parents c8c74c8 + 6292337 commit 0cf1ebc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions main/commands/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func realPing(api *API, response *serial.OrderedMap) {
id, _ := strconv.Atoi(idx)
if target := swh.Choose(custom, id); target != nil {
if url, ok := target.(shareurls.ShareUrl); ok {
results = append(results, shareurls.Result{Name: idx, Url: url, Port: port, Value: -1})
results = append(results, shareurls.Result{Index: idx, Url: url, Port: port, Value: -1})
port += 1
}
}
Expand All @@ -147,7 +147,8 @@ func realPing(api *API, response *serial.OrderedMap) {
select {
case result := <-workChan:
var res serial.OrderedMap
res.Set(result.Name, result.Value)
res.Set("index", result.Index)
res.Set("realping", result.Value)
responseArr = append(responseArr, res)
}
}
Expand Down
2 changes: 1 addition & 1 deletion main/shareurls/speedtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
)

type Result struct {
Name string
Index string
Url ShareUrl
Port int
Value int
Expand Down

0 comments on commit 0cf1ebc

Please sign in to comment.