Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POLL] Iris + Go Modules (Import path suffix or not) #1370

kataras opened this issue Oct 3, 2019 · 0 comments


Copy link

commented Oct 3, 2019

Hello Iris Community,

As you know the Go Team released the go modules.

There are two opened issues:

I would like to have your opinion on a serious subject about the import path. There are two ways to fix the above.

The first one is to keep the same import path and do:

$ go get

This will add a pseudo-version inside your project's go.mod:

require ( v0.0.0-20191005193354-55afd07befa8

The import paths inside your program should look like that:

package mypackage

import ""
import ""

However, tools like go mod tidy or if someone tried go get will fail after go 1.3 because it does not contain the version suffix.

The second solution one is to increment the major version, replace and keep updating all import paths inside Iris and iris-contrib/middleware, iris-contrib/examples and e.t.c. to (see the version suffix, which can be a git branch or tag of this repository).

$ go get

This should download the latest tagged version of v12.

The go.mod can look like that:

require( v12.0.0
package mypackage

import ""
import ""
// [...]

There are several downsides of changing the import path, as it is a huge breaking change but in the same time it's the standard Go's way nowadays.

Please think of it and vote up what you would like to happen here.

Gerasimos Maropoulos, Author of Iris.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.