timpalpant / go-iex

A Go library for accessing the IEX Developer API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors when running example pcap download/parsing code

jpjamipark opened this issue · comments

commented

Thanks for writing this library, it's very helpful for me.

I'm new to Go, and currently trying to run the sample code in the readme. I've created a new directory in go/src, and when I try to run the file using go run testfile.go, I get the following error:

# command-line-arguments
./hello.go:33:19: cannot assign 1 values to 2 variables
./hello.go:33:45: cannot use resp.Body (type io.ReadCloser) as type iex.PacketDataSource in argument to iex.NewPcapScanner:
	io.ReadCloser does not implement iex.PacketDataSource (missing LinkType method)

As a Go newbie, I'd appreciate any help with understanding this error. Thanks!

Sorry about that, the example in the README needs an update to reflect the changes in e9356d7.

Fixed in f7ef89f, please give it another shot with the latest example.

commented

This worked for me. Thank you!