Skip to content

Commit

Permalink
fix: Speed field data type as float64, not string
Browse files Browse the repository at this point in the history
  • Loading branch information
HJ-Fan committed Aug 7, 2024
1 parent 7b86e44 commit 88d8dfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/backend/httpfish.go
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ func (service *httpfishService) GetPortDetails(ctx context.Context, settings *Co

portField, err := response.valueFromJSON("Port")
if err == nil {
speedFloat, _ := strconv.ParseFloat(strings.TrimSpace(portField.(map[string]interface{})["CurrentSpeedGbps"].(string)), 64)
speedFloat, _ := portField.(map[string]interface{})["CurrentSpeedGbps"].(float64)
ret.PortInformation.CurrentSpeedGbps = int32(speedFloat)
}

Expand Down

0 comments on commit 88d8dfe

Please sign in to comment.