sirius/main.go

30 lines
456 B
Go
Raw Normal View History

2023-04-14 09:01:18 +03:00
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"gitstore.ru/tolikproh/sirius/model"
)
func main() {
var sirius model.Sirius
siriusJson, err := ioutil.ReadFile("data1.json")
if err != nil {
fmt.Println("No read file")
panic(err)
}
fmt.Println(json.Valid(siriusJson))
err = json.Unmarshal(siriusJson, &sirius)
if err != nil {
fmt.Println("Error unmarshal")
panic(err)
}
sirius.Zone.Get()
fmt.Println(sirius.Zone.Get())
}