add 32 bit releaser and add exit code in cmd

This commit is contained in:
Sadayuki Matsuno
2020-06-05 14:30:08 +09:00
parent 621fa8a01f
commit 0e0f946f5c
3 changed files with 15 additions and 1 deletions

View File

@@ -58,12 +58,14 @@ func main() {
scanResultJSON = buf.Bytes()
} else {
fmt.Println("use --stdin option")
os.Exit(1)
return
}
var scanResult models.ScanResult
if err = json.Unmarshal(scanResultJSON, &scanResult); err != nil {
fmt.Println("Failed to parse json", err)
os.Exit(1)
return
}
scanResult.ServerUUID = serverUUID
@@ -72,7 +74,8 @@ func main() {
config.Conf.Saas.Token = token
config.Conf.Saas.URL = url
if err = (report.SaasWriter{}).Write(scanResult); err != nil {
fmt.Println("Failed to create json", err)
fmt.Println(err)
os.Exit(1)
return
}
return