Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: module name. #106

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
sudo: false
language: go
go:
- 1.11
- 1.12
- 1.13
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
script:
- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
after_success:
Expand Down
39 changes: 7 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# FaunaDB Go Driver

[![Go Report Card](https://goreportcard.com/badge/github.com/fauna/faunadb-go)](https://goreportcard.com/report/github.com/fauna/faunadb-go)
[![GoDoc](https://godoc.org/github.com/fauna/faunadb-go/faunadb?status.svg)](https://godoc.org/github.com/fauna/faunadb-go/faunadb)
[![GoDoc](https://godoc.org/github.com/fauna/faunadb-go/faunadb?status.svg)](https://pkg.go.dev/github.com/fauna/faunadb-go?tab=overview)
[![License](https://img.shields.io/badge/license-MPL_2.0-blue.svg?maxAge=2592000)](https://raw.githubusercontent.com/fauna/faunadb-go/master/LICENSE)

A Go lang driver for [FaunaDB](https://fauna.com/).
Expand All @@ -20,46 +20,21 @@ Currently, the driver is tested on:
To get the latest version run:

```bash
go get github.com/fauna/faunadb-go/faunadb
go get github.com/fauna/faunadb-go/v2/faunadb
```

Please note that our driver undergoes breaking changes from time to time, so depending on our `master` branch is not recommended.
It is recommended to use one of the following methods instead:

#### Using `gopkg.in`

To get a specific version when using `gopkg.in`, use:

```bash
go get gopkg.in/fauna/faunadb-go.v2/faunadb
```

#### Using `dep`

To get a specific version when using `dep`, use:

```bash
dep ensure -add github.com/fauna/faunadb-go/faunadb@v2.12.1
```

### Importing

For better usage, we recommend that you import this driver with an alias import.

#### Using `gopkg.in`

To import a specific version when using `gopkg.in`, use:

```go
import f "gopkg.in/fauna/faunadb-go.v2/faunadb"
```

#### Using `dep` or `go get`
#### Using `go get`

To import a specific version when using `dep` or `go get`, use:
To import a specific version when using `go get`, use:

```go
import f "github.com/fauna/faunadb-go/faunadb"
import f "github.com/fauna/faunadb-go/v2/faunadb"
```

### Basic Usage
Expand All @@ -70,7 +45,7 @@ package main
import (
"fmt"

f "github.com/fauna/faunadb-go/faunadb"
f "github.com/fauna/faunadb-go/v2/faunadb"
)

type User struct {
Expand Down Expand Up @@ -99,7 +74,7 @@ For more information about FaunaDB query language, consult our query language
[reference documentation](https://docs.fauna.com/fauna/current/reference/queryapi/).

Specific reference documentation for the driver is hosted at
[GoDoc](https://godoc.org/github.com/fauna/faunadb-go/faunadb).
[GoDoc](https://pkg.go.dev/github.com/fauna/faunadb-go?tab=overview).


Most users found tests for the driver as a very useful form of documentation
Expand Down
2 changes: 1 addition & 1 deletion faunadb/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

f "github.com/fauna/faunadb-go/faunadb"
f "github.com/fauna/faunadb-go/v2/faunadb"
"github.com/stretchr/testify/suite"
)

Expand Down
2 changes: 1 addition & 1 deletion faunadb/example_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package faunadb_test

import f "github.com/fauna/faunadb-go/faunadb"
import f "github.com/fauna/faunadb-go/v2/faunadb"

var (
data = f.ObjKey("data")
Expand Down
10 changes: 4 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module github.com/fauna/faunadb-go
module github.com/fauna/faunadb-go/v2

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.2.2
)
go 1.13

require github.com/stretchr/testify v1.6.1
13 changes: 9 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=