Can't retrieve info on the top 10 Python packages
cclauss opened this issue · 2 comments
cclauss commented
I can make this work in Python but I am struggling to replicate in Go...
https://github.com/cclauss/go-hacks/blob/master/pypiTop10.go Any tips?
oz commented
In your code result
is an array, but the Go library expects a slice type, so change its type. Maybe:
var result []interface{}
cclauss commented
Thanks much @oz !!
var result []interface{} lets me get back 10 items when I request 10. Nice forward progress!
My remaining problem is to convert each item returned into type pkgInfo.