oschwald / maxminddb-golang

MaxMind DB Reader for Go
ISC License
576 stars 99 forks source link

go get github.com/oschwald/maxminddb-golang does not return the latest code in github #72

Closed Villenny closed 4 years ago

Villenny commented 4 years ago

It does install v1.6.0, but the code doesnt match the current code in github.com

For example traverse.go contains no method called NetworkWithin()

$ cat ~/go/pkg/mod/github.com/oschwald/maxminddb-golang\@v1.6.0/traverse.go | grep 'Network'
// Networks represents a set of subnets that we are iterating over.
type Networks struct {
// Networks returns an iterator that can be used to traverse all networks in
func (r *Reader) Networks() *Networks {
        return &Networks{
// Next prepares the next network for reading with the Network method. It
func (n *Networks) Next() bool {
// Network returns the current network or an error if there is a problem
func (n *Networks) Network(result interface{}) (*net.IPNet, error) {
func (n *Networks) Err() error {

go get -v -u github.com/oschwald/maxminddb-golang didnt help

Had to go get -v -u github.com/oschwald/maxminddb-golang@master to force it to ignore versioning:

After which I have:

$ ls -alF ~/go/pkg/mod/github.com/oschwald/
total 36
drwxr-xr-x 1 rhaksi 197608 0 Jun 12 15:51  ./
drwxr-xr-x 1 rhaksi 197608 0 Jun 12 15:37  ../
drwxr-xr-x 1 rhaksi 197608 0 Jun 12 15:37 'geoip2-golang@v1.4.0'/
drwxr-xr-x 1 rhaksi 197608 0 Jun 12 15:37 'maxminddb-golang@v1.6.0'/
drwxr-xr-x 1 rhaksi 197608 0 Jun 12 15:51 'maxminddb-golang@v1.6.1-0.20200605031231-64a88defffc2'/
oalders commented 4 years ago

NetworksWithin was added after the latest tag.

oschwald commented 4 years ago

Yeah, I apparently have not done a release since it was added. I'll do one soon.

oschwald commented 4 years ago

I published 1.7.0. Thanks for the reminder!