@@ -4,11 +4,11 @@ The official Go client for [Elasticsearch](https://www.elastic.co/products/elast
4
4
5
5
[ ![ GoDoc] ( https://godoc.org/github.com/elastic/go-elasticsearch?status.svg )] ( https://pkg.go.dev/github.com/elastic/go-elasticsearch/v7 )
6
6
[ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/elastic/go-elasticsearch )] ( https://goreportcard.com/report/github.com/elastic/go-elasticsearch )
7
- [ ![ codecov.io] ( https://codecov.io/github/elastic/go-elasticsearch/coverage.svg?branch=master )] ( https://codecov.io/gh/elastic/go-elasticsearch?branch=master )
8
- [ ![ Build] ( https://github.com/elastic/go-elasticsearch/workflows/Build/badge.svg )] ( https://github.com/elastic/go-elasticsearch/actions?query=branch%3A7.x )
9
- [ ![ Unit] ( https://github.com/elastic/go-elasticsearch/workflows/Unit/badge.svg )] ( https://github.com/elastic/go-elasticsearch/actions?query=branch%3A7.x )
10
- [ ![ Integration] ( https://github.com/elastic/go-elasticsearch/workflows/Integration/badge.svg )] ( https://github.com/elastic/go-elasticsearch/actions?query=branch%3A7.x )
11
- [ ![ API] ( https://github.com/elastic/go-elasticsearch/workflows/API/badge.svg )] ( https://github.com/elastic/go-elasticsearch/actions?query=branch%3A7.x )
7
+ [ ![ codecov.io] ( https://codecov.io/github/elastic/go-elasticsearch/coverage.svg?branch=main )] ( https://codecov.io/gh/elastic/go-elasticsearch?branch=main )
8
+ [ ![ Build] ( https://github.com/elastic/go-elasticsearch/workflows/Build/badge.svg )] ( https://github.com/elastic/go-elasticsearch/actions?query=branch%3Amain )
9
+ [ ![ Unit] ( https://github.com/elastic/go-elasticsearch/workflows/Unit/badge.svg )] ( https://github.com/elastic/go-elasticsearch/actions?query=branch%3Amain )
10
+ [ ![ Integration] ( https://github.com/elastic/go-elasticsearch/workflows/Integration/badge.svg )] ( https://github.com/elastic/go-elasticsearch/actions?query=branch%3Amain )
11
+ [ ![ API] ( https://github.com/elastic/go-elasticsearch/workflows/API/badge.svg )] ( https://github.com/elastic/go-elasticsearch/actions?query=branch%3Amain )
12
12
13
13
## Compatibility
14
14
@@ -17,14 +17,14 @@ Elasticsearch language clients are only backwards compatible with default distri
17
17
18
18
When using Go modules, include the version in the import path, and specify either an explicit version or a branch:
19
19
20
- require github.com/elastic/go-elasticsearch/v7 7.x
20
+ require github.com/elastic/go-elasticsearch/v7 7.16
21
21
require github.com/elastic/go-elasticsearch/v7 7.0.0
22
22
23
23
It's possible to use multiple versions of the client in a single project:
24
24
25
25
// go.mod
26
26
github.com/elastic/go-elasticsearch/v6 6.x
27
- github.com/elastic/go-elasticsearch/v7 7.x
27
+ github.com/elastic/go-elasticsearch/v7 7.16
28
28
29
29
// main.go
30
30
import (
@@ -35,19 +35,19 @@ It's possible to use multiple versions of the client in a single project:
35
35
es6, _ := elasticsearch6.NewDefaultClient()
36
36
es7, _ := elasticsearch7.NewDefaultClient()
37
37
38
- The ` master ` branch of the client is compatible with the current ` master ` branch of Elasticsearch.
38
+ The ` main ` branch of the client is compatible with the current ` master ` branch of Elasticsearch.
39
39
40
40
<!-- ----------------------------------------------------------------------------------------------- -->
41
41
42
42
## Installation
43
43
44
44
Add the package to your ` go.mod ` file:
45
45
46
- require github.com/elastic/go-elasticsearch/v7 7.x
46
+ require github.com/elastic/go-elasticsearch/v8 main
47
47
48
48
Or, clone the repository:
49
49
50
- git clone --branch 7.x https://github.com/elastic/go-elasticsearch.git $GOPATH/src/github.com/elastic/go-elasticsearch
50
+ git clone --branch main https://github.com/elastic/go-elasticsearch.git $GOPATH/src/github.com/elastic/go-elasticsearch
51
51
52
52
A complete example:
53
53
@@ -57,7 +57,7 @@ mkdir my-elasticsearch-app && cd my-elasticsearch-app
57
57
cat > go.mod << -END
58
58
module my-elasticsearch-app
59
59
60
- require github.com/elastic/go-elasticsearch/v7 7.x
60
+ require github.com/elastic/go-elasticsearch/v8 main
61
61
END
62
62
63
63
cat > main.go << -END
0 commit comments