Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions serverless/pages/clients-go-getting-started.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[elasticsearch-go-client-getting-started]]
= Get started with the serverless Go client
= Get started with the Elasticsearch Go client

// :description: Set up and use the Go client for {es3}.
// :description: Set up and use the Go client.
// :keywords: serverless, elasticsearch, go, how to

[NOTE]
Expand All @@ -17,7 +17,7 @@ client for {es3}, shows you how to initialize the client, and how to perform bas
[[elasticsearch-go-client-getting-started-requirements]]
== Requirements

* Go 1.20 or higher installed on your system.
* Go 1.22 or higher installed on your system.

[discrete]
[[elasticsearch-go-client-getting-started-installation]]
Expand All @@ -32,7 +32,7 @@ commands:

[source,bash]
----
go get -u github.com/elastic/elasticsearch-serverless-go@latest
go get -u github.com/elastic/go-elasticsearch/v8@latest
----

[discrete]
Expand All @@ -50,9 +50,9 @@ import (
"log"
"strconv"

"github.com/elastic/elasticsearch-serverless-go"
"github.com/elastic/elasticsearch-serverless-go/typedapi/types"
"github.com/elastic/elasticsearch-serverless-go/typedapi/types/enums/result"
"github.com/elastic/go-elasticsearch/v8"
"github.com/elastic/go-elasticsearch/v8/typedapi/types"
"github.com/elastic/go-elasticsearch/v8/typedapi/types/enums/result"
)
----

Expand All @@ -64,12 +64,12 @@ Initialize the client using your API key and {es} endpoint:

[source,go]
----
client, err := elasticsearch.NewClient(elasticsearch.Config{
APIKey: "you_api_key",
Address: "https://my-project-url",
client, err := elasticsearch.NewTypedClient(elasticsearch.Config{
Addresses: []string{"https://my-project-url"},
APIKey: "your-api-key",
})
if err != nil {
log.Fatal(err)
log.Fatalf("Error creating the client: %s", err)
}
----

Expand Down
Loading