add: reflection decoder

This commit is contained in:
Inanc Gumus
2019-09-03 12:41:45 +03:00
parent 5f7b9eabed
commit fc349bd51d
10 changed files with 337 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
// 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)
// }
}