Skip to content

Commit

Permalink
Remove /v6 from import path
Browse files Browse the repository at this point in the history
This commit removes the `/v6` from the import path and reverts the Go
module from `github.com/olivere/elastic/v6` to just
`github.com/olivere/elastic`.

The reason for that is that existing tools like `dep` and `glide`
currently don't support minimal module-awareness and are therefor
confused with the trailing `/v6`. Go 1.9.7, Go 1.10.4 and Go 1.11 have
this kind of module-awareness now, but tooling lacks a bit behind.

This makes it impossible for Elastic to be a good citizen for both
camps, and we need to delay 100% Go modules support to a later release.
  • Loading branch information
olivere committed Aug 28, 2018
1 parent 3b4280a commit 66b430c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ matrix:
- go: tip
env:
- GO111MODULE=on
- GO111MODULE=auto
- GO111MODULE=off
addons:
ssh_known_hosts: github.com
apt:
Expand Down
1 change: 0 additions & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"time"

"github.com/olivere/elastic"
// "github.com/olivere/elastic/v6" // <- with Go modules
)

type Tweet struct {
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
module github.com/olivere/elastic/v6
module github.com/olivere/elastic

require (
github.com/fortytw2/leaktest v1.2.0
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329
github.com/olivere/elastic v6.1.25+incompatible
github.com/opentracing/opentracing-go v1.0.2
github.com/pkg/errors v0.8.0
github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9
Expand Down
4 changes: 2 additions & 2 deletions recipes/go-modules/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Example
//
//
// go run main.go -url=http://127.0.0.1:9200 -sniff=false
// GO111MODULE=on go run main.go -url=http://127.0.0.1:9200 -sniff=false
//
package main

Expand All @@ -17,7 +17,7 @@ import (
"fmt"
"log"

"github.com/olivere/elastic/v6"
"github.com/olivere/elastic" // <- should end with /v6, but missing due to compatibility reasons
)

func main() {
Expand Down

0 comments on commit 66b430c

Please sign in to comment.