refactor and removing unused code

This commit is contained in:
Alexander Zobnin
2020-06-02 17:18:38 +03:00
parent a5f8eb02bb
commit ff0b8b9dff
4 changed files with 50 additions and 194 deletions

View File

@@ -1,8 +1,15 @@
package zabbixapi
import "encoding/json"
type ZabbixAPIRequest struct {
Method string `json:"method"`
Params ZabbixAPIParams `json:"params,omitempty"`
}
func (r *ZabbixAPIRequest) String() string {
jsonRequest, _ := json.Marshal(r.Params)
return r.Method + string(jsonRequest)
}
type ZabbixAPIParams = map[string]interface{}