You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ly...@apache.org on 2022/04/12 21:51:43 UTC
[tinkerpop] branch 3.5-dev updated: changing go.mod version to 3 and updating documentation for gremlin-go
This is an automated email from the ASF dual-hosted git repository.
lyndonb pushed a commit to branch 3.5-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/3.5-dev by this push:
new f2c36947b0 changing go.mod version to 3 and updating documentation for gremlin-go
f2c36947b0 is described below
commit f2c36947b0dc6e7be7dab4499b53481259acc72b
Author: Lyndon Bauto <ly...@bitquilltech.com>
AuthorDate: Tue Apr 12 14:50:28 2022 -0700
changing go.mod version to 3 and updating documentation for gremlin-go
---
gremlin-go/README.md | 18 ++++++++----------
gremlin-go/go.mod | 2 +-
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/gremlin-go/README.md b/gremlin-go/README.md
index 034e25fb60..e0421badbf 100644
--- a/gremlin-go/README.md
+++ b/gremlin-go/README.md
@@ -32,7 +32,7 @@ If you would like to build and/or test the source code, you can do so with docke
Docker allows you to test the driver without installing any dependencies. The following command can be used to run docker:
-`docker-compose up --exit-code-from integration-tests integration-tests`
+`docker-compose up --exit-code-from integration-tests`
### Building Directly
@@ -72,9 +72,7 @@ Please review the [staticcheck documentation][scheck docs] for more details on i
To install the Gremlin-Go as a dependency for your project, run the following in the root directory of your project that contains your `go.mod` file:
-`go get github.com/apache/tinkerpop/gremlin-go[optionally append @<version>, note this requires GO111MODULE=on]`
-
-Note: Currently as of Milestone #2, Gremlin-Go exists on the `gremlin-go` branch. Expect this to change in the future when the project is merged to .
+`go get github.com/apache/tinkerpop/gremlin-go/v3[optionally append @<version>, such as @v3.5.3 - note this requires GO111MODULE=on]`
After running the `go get` command, your `go.mod` file should contain something similar to the following:
@@ -83,7 +81,7 @@ module gremlin-go-example
go 1.17
-require github.com/apache/tinkerpop/gremlin-go v<version>
+require github.com/apache/tinkerpop/gremlin-go/v3 v<version>
```
If it does, then this means Gremlin-Go was successfully installed as a dependency of your project.
@@ -98,7 +96,7 @@ import (
func main() {
// Simple stub to use the import. See subsequent section for actual usage.
- _, _ = gremlingo.NewDriverRemoteConnection("localhost", 8182)
+ _, _ = gremlingo.NewDriverRemoteConnection(fmt.Sprintf("ws://%s:%d", fmt.Sprintf("ws://%s:%d", "localhost", 8182)))
}
```
You will need to run `go mod tidy` to import the remaining dependencies of the `gremlin-go` driver (if your IDE does not do so automatically), after which you should see an updated `go.mod` file:
@@ -131,7 +129,7 @@ import (
func main() {
// Creating the connection to the server.
- driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection("localhost", 8182)
+ driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection(fmt.Sprintf("ws://%s:%d", "localhost", 8182))
if err != nil {
fmt.Println(err)
return
@@ -186,7 +184,7 @@ import (
func main() {
// Creating the connection to the server with default settings.
- driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection("localhost", 8182)
+ driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection(fmt.Sprintf("ws://%s:%d", "localhost", 8182))
// Handle error
if err != nil {
fmt.Println(err)
@@ -207,7 +205,7 @@ import (
func main() {
// Creating the connection to the server, changing the log verbosity to Debug.
- driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection("localhost", 8182, func(settings *gremlingo.DriverRemoteConnectionSettings) {
+ driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection(fmt.Sprintf("ws://%s:%d", "localhost", 8182), func(settings *gremlingo.DriverRemoteConnectionSettings) {
settings.LogVerbosity = gremlingo.Debug
})
// Handle error
@@ -232,7 +230,7 @@ import (
func main() {
// Creating the connection to the server.
- driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection("localhost", 8182)
+ driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection(fmt.Sprintf("ws://%s:%d", "localhost", 8182))
// Handle error
if err != nil {
fmt.Println(err)
diff --git a/gremlin-go/go.mod b/gremlin-go/go.mod
index 4e0adccd32..d2c2b5e8ba 100644
--- a/gremlin-go/go.mod
+++ b/gremlin-go/go.mod
@@ -17,7 +17,7 @@
// If this file is changed, please also update the NOTICE file under gremlin-go.
-module github.com/apache/tinkerpop/gremlin-go
+module github.com/lyndonbauto/tinkerpop/gremlin-go/v3
go 1.17