Compare commits
No commits in common. "1fc099c1be490f095df0d3ab405c493ac80b8d39" and "75e96b9851456e43920682de6ab1557888dbc124" have entirely different histories.
1fc099c1be
...
75e96b9851
@ -1,18 +1,9 @@
|
|||||||
package jsonutils
|
package jsonutils
|
||||||
|
|
||||||
//TODO: Rename package
|
import "encoding/json"
|
||||||
import (
|
|
||||||
"encoding/json"
|
|
||||||
"io"
|
|
||||||
)
|
|
||||||
|
|
||||||
func ConvertToJSON(g interface{}) []byte {
|
func ConvertToJSON(g interface{}) []byte {
|
||||||
g_json, err := json.Marshal(g)
|
g_json, err := json.Marshal(g)
|
||||||
_ = err //TODO: Check Errors
|
_ = err //TODO: Check Errors
|
||||||
return g_json
|
return g_json
|
||||||
}
|
}
|
||||||
|
|
||||||
func ConvertFromJSON(body io.ReadCloser, inter interface{}) {
|
|
||||||
json_err := json.NewDecoder(body).Decode(&inter)
|
|
||||||
_ = json_err //TODO work with errors
|
|
||||||
}
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package updateutils
|
package updateutils
|
||||||
|
|
||||||
type LastVersion struct { //Rename to Version
|
type LastVersion struct {
|
||||||
Major int
|
Major int
|
||||||
Minor int
|
Minor int
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user