asaskevich / govalidator

[Go] Package of validators and sanitizers for strings, numerics, slices and structs
MIT License
5.97k stars 554 forks source link

Choice of tags breaks semantic versioning #491

Open nyetwurk opened 1 year ago

nyetwurk commented 1 year ago

Bug Report

All tags are bad.

Summary

https://go.dev/ref/mod#versions

Major version suffixes

Starting with major version 2, module paths must have a major version suffix like /v2 that matches the major version. For example, if a module has the path example.com/mod at v1.0.0, it must have the path example.com/mod/v2 at version v2.0.0.

Current behavior

govalidator has all sorts of v10 and v11 tags.

How to reproduce

$ go get -u github.com/asaskevich/govalidator@v11.0.1
go: github.com/asaskevich/govalidator@v11.0.1: invalid version: module contains a go.mod file, so module path must match major version ("github.com/asaskevich/govalidator/v11")

Expected behavior

No output, but go.mod should have a github.com/asaskevich/govalidator/v11 in it.

leild commented 1 year ago

Okay, please give me a plan and version of the problem. Thank you.

nyetwurk commented 1 year ago

Okay, please give me a plan and version of the problem. Thank you.

What are you asking for?

If you want to tag v11.x.x the full path of the module has to end in /v11