pin / tftp

TFTP server and client library for Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The distribution seems incorrect

sheerun opened this issue · comments

I can't use your package when using go mod:

$ go mod tidy
go: finding module for package github.com/pin/tftp/v2
tftpserver imports
	github.com/pin/tftp/v2: no matching versions for query "latest"

The reason is explained with this command:

go list -m -versions -json github.com/pin/tftp/v2
go: loading module retractions for github.com/pin/tftp/v2@v2.0.0: version "v2.2.0" invalid: go.mod has non-.../v2 module path "github.com/pin/tftp" (and .../v2/go.mod does not exist) at revision v2.2.0

I guess the solution is to add v2.3.0 tag which has v2/go.mod file and use /v2 suffing in go.mod

Could you please fix it? :) Thank you

Hmm, probably not only go.mod should be in v2 folder but all of other files as well. In other words, root directory of this package should contain v1, and v2 dirtectory should contain version v2?

All the discussion so far is in #70. Current plan is to keep v2 incompatible and cut v3 as a proper module.

Finally it is done. I tried to avoid 'v2' directory because it is annoying to have that versioning stuff in the code itself. So branch master is for v3 now and for the sake of the history the last v2.3.0 is preserved in v2 branch.

Cut the release for v3.0.0 so the code should be possible to import as github.com/pin/tftp/v3 hopefully without any warnings or +incompatible stuff.

pin@keg:~/go/src/github.com/pin/golang-tftp-example$ go list -m -versions -json github.com/pin/tftp/v3
{
        "Path": "github.com/pin/tftp/v3",
        "Version": "v3.0.0",
        "Versions": [
                "v3.0.0"
        ],
        "Time": "2022-07-21T07:10:59Z",
        "Dir": "/home/pin/go/pkg/mod/github.com/pin/tftp/v3@v3.0.0",
        "GoMod": "/home/pin/go/pkg/mod/cache/download/github.com/pin/tftp/v3/@v/v3.0.0.mod",
        "GoVersion": "1.13"
}