go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

Test and update import path to github.com/redis/go-redis/v9

Open vmihailenco opened this issue 3 years ago • 3 comments

It probably will look like this:

import redis "github.com/redis/go-redis/v9"

Checking if https://pkg.go.dev/golang.org/x/tools/cmd/goimports is still working would be nice.

  • [ ] Should we add a canonical import path?
package redis // import "github.com/redis/go-redis/v9"

Another possibility will be using an import path like go.redis.io/redis, but not sure if that is worth it.

/cc @chayim

vmihailenco avatar Sep 20 '22 11:09 vmihailenco

I really like the trend to go.redis.io/redis to be honest. I'll poke the internal folks and see what we can do here.

chayim avatar Sep 29 '22 07:09 chayim

@chayim yeah, its kinda nice when done right, for example, go.opentelemetry.io/otel works as an import path, but redirects to https://pkg.go.dev/go.opentelemetry.io/otel when accessed from a browser so it is more user friendly then the default.

vmihailenco avatar Sep 30 '22 13:09 vmihailenco

@chayim I am assigning this to you to check whether supporting go.redis.io/redis/v9 is a feasible option. If not, we will go with github.com/redis/go-redis/v9.

https://sagikazarmark.hu/blog/vanity-import-paths-in-go/ should have some details.

vmihailenco avatar Oct 05 '22 13:10 vmihailenco

Closing since we decided to not use vanity import path. The import path will be

import redis "github.com/redis/go-redis/v9"

vmihailenco avatar Jan 21 '23 08:01 vmihailenco