bugst / go-serial

A cross-platform serial library for go-lang.
BSD 3-Clause "New" or "Revised" License
657 stars 199 forks source link

go module picks untagged revision #94

Closed zyga closed 3 years ago

zyga commented 3 years ago

Hello

I have not used the module system much before but I've recently started using it in a new project and I've noticed that the your package gets picked up as the raw commit, not the tagged version. For example, this is what I got in my go.mod file:

    go.bug.st/serial.v1 v0.0.0-20191202182710-24a6610f0541

Since there are three tags on the project I was expecting go to pick v1.1.1. Do you know if this is expected?

cmaglie commented 3 years ago

Use go.bug.st/serial (without the .v1 suffix)

I've changed the import because go modules now have their own way to handle major version updates: if in the future there will be a v2 the import will change to go.bug.st/serial/v2 (so keeping the old one would have lead to the weird go.bug.st/serial.v1/v2...).

(related to https://github.com/bugst/go-serial/issues/49 and https://github.com/bugst/go-serial/pull/66)