cavaliergopher / grab

A download manager package for Go
BSD 3-Clause "New" or "Revised" License
1.38k stars 151 forks source link

cannot call non-function resp.Size (type int64) #91

Open abelikoff opened 3 years ago

abelikoff commented 3 years ago

Apologies if this is some rookie mistake - I'm fairly new to Go :-)

When trying the basic grab example (straight from the homepage), I'm getting an error: cannot call non-function resp.Size (type int64)

This is with Go 1.16.3 (reproducible both on MacOS and Raspbian; go env output attached). go mod reports github.com/cavaliercoder/grab@v2.0.0+incompatible.

Any help would be greatly appreciated.

goenv.txt main.go.txt

neepoo commented 3 years ago

you should change resp.Size() to resp.Size

abelikoff commented 3 years ago

Thanks - but my question was exactly about the weird effect that accepted resp.Size on one architecture and resp.Size() on another. The good thing is, since moving to go 1.16 it seems to be consistent and work as expected.

On Fri, Jun 25, 2021 at 3:18 AM neepoo @.***> wrote:

you should change resp.Size() to resp.Size

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cavaliercoder/grab/issues/91#issuecomment-868282019, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANMAOQQXNL65K7TSDVGSD3TUQUWBANCNFSM44JEZLDQ .