mirror of
https://github.com/hahwul/WebHackersWeapons.git
synced 2025-01-17 18:17:07 -05:00
Added install/update script ignore logic in add tools
This commit is contained in:
parent
05102346f1
commit
134abec4e7
11
add-tool.go
11
add-tool.go
@ -83,6 +83,17 @@ func writeJSON(category, name, method, data, udesc string) {
|
||||
Install: install,
|
||||
Update: update,
|
||||
}
|
||||
if result[name] != nil {
|
||||
resultData := result[name].(map[string]interface{})
|
||||
resultInstall := resultData["Install"].(map[string]interface{})
|
||||
resultUpdate := resultData["Update"].(map[string]interface{})
|
||||
tool.Install["MacOS"] = resultInstall["MacOS"].(string)
|
||||
tool.Install["Linux"] = resultInstall["Linux"].(string)
|
||||
tool.Install["Windows"] = resultInstall["Windows"].(string)
|
||||
tool.Update["MacOS"] = resultUpdate["MacOS"].(string)
|
||||
tool.Update["Linux"] = resultUpdate["Linux"].(string)
|
||||
tool.Update["Windows"] = resultUpdate["Windows"].(string)
|
||||
}
|
||||
result[name] = tool
|
||||
file, _ := json.MarshalIndent(result, "", " ")
|
||||
_ = ioutil.WriteFile("data.json", file, 0644)
|
||||
|
Loading…
Reference in New Issue
Block a user