DavidBelicza / TextRank

:wink: :cyclone: :strawberry: TextRank implementation in Golang with extendable features (summarization, phrase extraction) and multithreading (goroutine).
MIT License
205 stars 22 forks source link

Cannot use latest version with go.mod #12

Closed quintans closed 3 years ago

quintans commented 3 years ago

I am unable to use the latest version of the library, v2.1.2, with go modules. I get the error: require github.com/DavidBelicza/TextRank: version "v2.1.2" invalid: should be v0 or v1, not v2 To use v2.1.2 in go.mod we need to make the library available at github.com/DavidBelicza/TextRank/v2, according to https://github.com/golang/go/wiki/Modules#semantic-import-versioning

DavidBelicza commented 3 years ago

@quintans, Thanks for reporting this bug! It seems the /v2 can be appended to the module name in the go.mod file and it doesn't have to be placed under a new /v2 directory. So it would work like here: https://github.com/asim/go-micro. If that works, I'll push it to the master branch.

quintans commented 3 years ago

that would work.

DavidBelicza commented 3 years ago

@quintans now it works with go get github.com/DavidBelicza/TextRank/v2 https://sum.golang.org/lookup/github.com/davidbelicza/textrank/v2@v2.1.3