I think you probably to unmarshal into a []book.
From: on behalf of Hamsa Hesham
Date: Saturday, December 26, 2020 at 10:06 AM
To: golang-nuts
Subject: [go-nuts] json objects
how to unmarshal more than one json object ..
Here is the code
data, err := ioutil.ReadFile("file.txt")
checkE
Try to export your struct fields.
Sent from my iPhone
On Dec 25, 2020, at 6:30 PM, Amit Saha wrote:
On Sat, 26 Dec 2020, 10:25 am Hamsa Hesham,
mailto:hamsahesha...@gmail.com>> wrote:
package main
import "encoding/json"
import "log"
import "fmt"
type book struct {
IDint
ti