Skip to content

Commit

Permalink
remove type assertion before type conversion (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir authored May 31, 2023
1 parent e41d1d5 commit a421569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sources/agent/zoomeye/zoomeye.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (agent *Agent) query(URL string, session *sources.Session, zoomeyeRequest *
}
if portinfo, ok := zoomeyeResult["portinfo"]; ok {
if port, ok := portinfo.(map[string]interface{}); ok {
result.Port = convertPortFromValue(port["port"].(float64))
result.Port = convertPortFromValue(port["port"])
if result.Port == 0 {
continue
}
Expand Down

0 comments on commit a421569

Please sign in to comment.