Files
learngo/interfaces/11-reflection-decoder/main.go
2019-09-03 12:41:45 +03:00

32 lines
499 B
Go

// For more tutorials: https://blog.learngoprogramming.com
//
// Copyright © 2018 Inanc Gumus
// Learn Go Programming Course
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
//
package main
import (
"fmt"
"io/ioutil"
"log"
)
func main() {
data, err := ioutil.ReadFile("database.json")
if err != nil {
log.Fatalln(err)
}
store, err := decode(data)
if err != nil {
log.Fatalln(err)
}
fmt.Print(store)
// for _, p := range store {
// fmt.Printf("%#v\n", p)
// }
}