sirius/main.go
Anatoly Prohacky 666a1a3c12 Начало
2023-04-14 16:01:18 +10:00

30 lines
456 B
Go

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())
}