First question from book “The Go Programming Language”

Hi All,

I am happy to join this forum. This looks like a very valuable forum.

I started my journey with go just few days ago so I apologized if the answer to this question is to obvious.

I was going over the drill in the book “The Go Programming Language” in chapter 4

When running the program main.go the output is missing all the items (.Number, item.User.Login, item.Title) but I do see the TotalCount issues.

go run main.go repo:golang/go is:open json decoder
15 issues:

Any idea what I am missing ?

Thanks

Perhaps GitHub have changed their issue format. Try printing the length of the length of the result.Items slice

fmt.Println(len(result.Items), "items)

Yep looks like that. So in order to print it I should update the type Issue struct ?

Can you please advise.

Thanks

0 items

Maybe you could write to that authors, http://www.gopl.io and le them know this example has stopped working.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.