mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
Changed the wording of error messages slightly
This commit is contained in:
parent
cc7bad8b94
commit
0403b2bcbc
11 changed files with 31 additions and 32 deletions
|
|
@ -45,13 +45,13 @@ func QueryScannedPorts() error {
|
|||
url := makeEndpointUrl("/scanned_ports")
|
||||
_, body, err := util.MakeRequest(nil, url, "GET", nil, nil)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not discover assets: %v", err)
|
||||
return fmt.Errorf("failed todiscover assets: %v", err)
|
||||
}
|
||||
|
||||
// get data from JSON
|
||||
var res map[string]any
|
||||
if err := json.Unmarshal(body, &res); err != nil {
|
||||
return fmt.Errorf("could not unmarshal response body: %v", err)
|
||||
return fmt.Errorf("failed tounmarshal response body: %v", err)
|
||||
}
|
||||
data := res["data"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue