Compare commits
2 Commits
75e96b9851
...
1fc099c1be
Author | SHA1 | Date | |
---|---|---|---|
1fc099c1be | |||
39232f8664 |
@ -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
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package updateutils
|
||||
|
||||
type LastVersion struct {
|
||||
type LastVersion struct { //Rename to Version
|
||||
Major int
|
||||
Minor int
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user