Compare commits

..

2 Commits

Author SHA1 Message Date
1fc099c1be add decode json method 2022-11-02 12:53:30 +03:00
39232f8664 add TODO 2022-11-02 12:53:22 +03:00
2 changed files with 11 additions and 2 deletions

View File

@ -1,9 +1,18 @@
package jsonutils
import "encoding/json"
//TODO: Rename package
import (
"encoding/json"
"io"
)
func ConvertToJSON(g interface{}) []byte {
g_json, err := json.Marshal(g)
_ = err //TODO: Check Errors
return g_json
}
func ConvertFromJSON(body io.ReadCloser, inter interface{}) {
json_err := json.NewDecoder(body).Decode(&inter)
_ = json_err //TODO work with errors
}

View File

@ -1,6 +1,6 @@
package updateutils
type LastVersion struct {
type LastVersion struct { //Rename to Version
Major int
Minor int
}