Skip to content

Commit

Permalink
workaround for influxdata#5
Browse files Browse the repository at this point in the history
  • Loading branch information
Toomas Pelberg committed May 23, 2019
1 parent 8ff2fc3 commit a44768e
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 26 deletions.
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# influxdb1-clientv2
influxdb1-clientv2 is the current Go client API for InfluxDB 1.x. A Go client for the 2.0 API will be coming soon.

InfluxDB is an open-source distributed time series database, find more about [InfluxDB](https://www.influxdata.com/time-series-platform/influxdb/) at https://docs.influxdata.com/influxdb/latest

## Usage
To import into your Go project, run the following command in your terminal:
`go get github.com/influxdata/influxdb1-client/v2`
Then, in your import declaration section of your Go file, paste the following:
`import "github.com/influxdata/influxdb1-client/v2"`

go get github.com/toomasp/influxdb1-client/v2

## Example
The following example creates a new client to the InfluxDB host on localhost:8086 and runs a query for the measurement `cpu_load` from the `mydb` database.
Expand All @@ -26,4 +19,4 @@ func ExampleClient_query() {
fmt.Println(response.Results)
}
}
```
```
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"time"

client "github.com/influxdata/influxdb1-client"
client "github.com/toomasp/influxdb1-client"
)

func ExampleNewClient() {
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/toomasp/influxdb1-client

go 1.12
6 changes: 3 additions & 3 deletions influxdb.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package client implements a now-deprecated client for InfluxDB;
// use github.com/influxdata/influxdb1-client/v2 instead.
package client // import "github.com/influxdata/influxdb1-client"
// use github.com/toomasp/influxdb1-client/v2 instead.
package client // import "github.com/toomasp/influxdb1-client"

import (
"bytes"
Expand All @@ -19,7 +19,7 @@ import (
"strings"
"time"

"github.com/influxdata/influxdb1-client/models"
"github.com/toomasp/influxdb1-client/models"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion influxdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"testing"
"time"

"github.com/influxdata/influxdb1-client"
"github.com/toomasp/influxdb1-client"
)

func BenchmarkWrite(b *testing.B) {
Expand Down
2 changes: 1 addition & 1 deletion models/inline_fnv.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package models // import "github.com/influxdata/influxdb1-client/models"
package models // import "github.com/toomasp/influxdb1-client/models"

// from stdlib hash/fnv/fnv.go
const (
Expand Down
2 changes: 1 addition & 1 deletion models/inline_fnv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"testing/quick"

"github.com/influxdata/influxdb1-client/models"
"github.com/toomasp/influxdb1-client/models"
)

func TestInlineFNV64aEquivalenceFuzz(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion models/inline_strconv_parse.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package models // import "github.com/influxdata/influxdb1-client/models"
package models // import "github.com/toomasp/influxdb1-client/models"

import (
"reflect"
Expand Down
4 changes: 2 additions & 2 deletions models/points.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package models implements basic objects used throughout the TICK stack.
package models // import "github.com/influxdata/influxdb1-client/models"
package models // import "github.com/toomasp/influxdb1-client/models"

import (
"bytes"
Expand All @@ -15,7 +15,7 @@ import (
"unicode"
"unicode/utf8"

"github.com/influxdata/influxdb1-client/pkg/escape"
"github.com/toomasp/influxdb1-client/pkg/escape"
)

type escapeSet struct {
Expand Down
2 changes: 1 addition & 1 deletion models/points_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"testing"
"time"

"github.com/influxdata/influxdb1-client/models"
"github.com/toomasp/influxdb1-client/models"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion models/statistic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/influxdata/influxdb1-client/models"
"github.com/toomasp/influxdb1-client/models"
)

func TestTags_Merge(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/escape/bytes.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package escape contains utilities for escaping parts of InfluxQL
// and InfluxDB line protocol.
package escape // import "github.com/influxdata/influxdb1-client/pkg/escape"
package escape // import "github.com/toomasp/influxdb1-client/pkg/escape"

import (
"bytes"
Expand Down
4 changes: 2 additions & 2 deletions v2/client.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package client (v2) is the current official Go client for InfluxDB.
package client // import "github.com/influxdata/influxdb1-client/v2"
package client // import "github.com/toomasp/influxdb1-client/v2"

import (
"bytes"
Expand All @@ -17,7 +17,7 @@ import (
"strings"
"time"

"github.com/influxdata/influxdb1-client/models"
"github.com/toomasp/influxdb1-client/models"
)

// HTTPConfig is the config data needed to create an HTTP Client.
Expand Down
2 changes: 1 addition & 1 deletion v2/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"time"

"github.com/influxdata/influxdb1-client/v2"
"github.com/toomasp/influxdb1-client/v2"
)

// Create a new client
Expand Down

0 comments on commit a44768e

Please sign in to comment.