go-reddit
go-reddit copied to clipboard
json: cannot unmarshal number 1564777310.0 into Go struct field Link.created of type int[]
All im trying to do is get the top posts of a subreddit. This is my code:
package main
import(
"fmt"
"github.com/cameronstanley/go-reddit"
)
func main() {
client := reddit.NoAuthClient
links, err := client.GetHotLinks("funny")
if err != nil {
fmt.Println(err)
}
fmt.Println(links)
}
But I keep getting this error:
json: cannot unmarshal number 1564777310.0 into Go struct field Link.created of type int []
I'm not sure if I'm doing something wrong or if there's a bug somewhere thats causing this.
@Mathisco-01 hi, I've had a similar issue and fixed this issue in my fork I don't think if it's correct fix, but it worked for my case 💃