Skip to content

Commit

Permalink
refactor: fix imports from go template files (#17615)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsternberg authored Apr 3, 2020
1 parent d2ea7c3 commit 6e4cf7f
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 22 deletions.
6 changes: 3 additions & 3 deletions pkg/data/gen/arrays.gen.go.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gen

import (
"github.com/influxdata/influxdb/tsdb/cursors"
"github.com/influxdata/influxdb/tsdb/tsm1"
"github.com/influxdata/influxdb/v2/tsdb/cursors"
"github.com/influxdata/influxdb/v2/tsdb/tsm1"
)

{{range .}}
Expand Down Expand Up @@ -33,4 +33,4 @@ func (a *{{$typename}}) Copy(dst *cursors.{{$tsdbname}}) {
dst.Timestamps = append(dst.Timestamps[:0], a.Timestamps...)
dst.Values = append(dst.Values[:0], a.Values...)
}
{{end}}
{{end}}
12 changes: 12 additions & 0 deletions pkg/data/gen/precision_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/data/gen/values_sequence.gen.go.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gen

import (
"github.com/influxdata/influxdb/models"
"github.com/influxdata/influxdb/tsdb/cursors"
"github.com/influxdata/influxdb/v2/models"
"github.com/influxdata/influxdb/v2/tsdb/cursors"
)

{{range .}}
Expand Down Expand Up @@ -57,4 +57,4 @@ func (s *time{{.Name}}ValuesSequence) Values() Values {
func (s *time{{.Name}}ValuesSequence) ValueType() models.FieldType {
return models.{{.Name}}
}
{{end}}
{{end}}
6 changes: 3 additions & 3 deletions storage/flux/table.gen.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"github.com/influxdata/flux/arrow"
"github.com/influxdata/flux/execute"
"github.com/influxdata/flux/memory"
"github.com/influxdata/influxdb/models"
storage "github.com/influxdata/influxdb/storage/reads"
"github.com/influxdata/influxdb/tsdb/cursors"
"github.com/influxdata/influxdb/v2/models"
storage "github.com/influxdata/influxdb/v2/storage/reads"
"github.com/influxdata/influxdb/v2/tsdb/cursors"
"github.com/pkg/errors"
)
{{range .}}
Expand Down
2 changes: 1 addition & 1 deletion storage/reads/array_cursor.gen.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package reads
import (
"errors"

"github.com/influxdata/influxdb/tsdb/cursors"
"github.com/influxdata/influxdb/v2/tsdb/cursors"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion storage/reads/datatypes/storage_common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tsdb/tsm1/array_cursor.gen.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package tsm1
import (
"sort"

"github.com/influxdata/influxdb/tsdb/cursors"
"github.com/influxdata/influxdb/v2/tsdb/cursors"
)

// Array Cursors
Expand Down
6 changes: 3 additions & 3 deletions tsdb/tsm1/array_cursor_iterator.gen.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package tsm1
import (
"context"

"github.com/influxdata/influxdb/models"
"github.com/influxdata/influxdb/query"
"github.com/influxdata/influxdb/tsdb/cursors"
"github.com/influxdata/influxdb/v2/models"
"github.com/influxdata/influxdb/v2/query"
"github.com/influxdata/influxdb/v2/tsdb/cursors"
)

{{range .}}
Expand Down
2 changes: 1 addition & 1 deletion tsdb/tsm1/compact.gen.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package tsm1
import (
"sort"

"github.com/influxdata/influxdb/tsdb/cursors"
"github.com/influxdata/influxdb/v2/tsdb/cursors"
)

{{range .}}
Expand Down
2 changes: 1 addition & 1 deletion tsdb/tsm1/encoding.gen.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package tsm1
import (
"sort"

"github.com/influxdata/influxdb/tsdb/cursors"
"github.com/influxdata/influxdb/v2/tsdb/cursors"
)

{{range .}}
Expand Down
6 changes: 3 additions & 3 deletions tsdb/tsm1/engine.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package tsm1 provides a TSDB in the Time Structured Merge tree format.
package tsm1 // import "github.com/influxdata/influxdb/tsdb/tsm1"
package tsm1

import (
"bytes"
Expand Down Expand Up @@ -32,8 +32,8 @@ import (
)

//go:generate env GO111MODULE=on go run github.com/benbjohnson/tmpl -data=@array_cursor.gen.go.tmpldata array_cursor.gen.go.tmpl array_cursor_iterator.gen.go.tmpl
//go:generate env GO111MODULE=on go run github.com/influxdata/influxdb/tools/tmpl -i -data=file_store.gen.go.tmpldata file_store.gen.go.tmpl=file_store.gen.go
//go:generate env GO111MODULE=on go run github.com/influxdata/influxdb/tools/tmpl -i -d isArray=y -data=file_store.gen.go.tmpldata file_store.gen.go.tmpl=file_store_array.gen.go
//go:generate env GO111MODULE=on go run github.com/influxdata/influxdb/v2/tools/tmpl -i -data=file_store.gen.go.tmpldata file_store.gen.go.tmpl=file_store.gen.go
//go:generate env GO111MODULE=on go run github.com/influxdata/influxdb/v2/tools/tmpl -i -d isArray=y -data=file_store.gen.go.tmpldata file_store.gen.go.tmpl=file_store_array.gen.go
//go:generate env GO111MODULE=on go run github.com/benbjohnson/tmpl [email protected] encoding.gen.go.tmpl
//go:generate env GO111MODULE=on go run github.com/benbjohnson/tmpl [email protected] compact.gen.go.tmpl
//go:generate env GO111MODULE=on go run github.com/benbjohnson/tmpl [email protected] reader.gen.go.tmpl
Expand Down
2 changes: 1 addition & 1 deletion tsdb/tsm1/file_store.gen.go.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tsm1

import (
"github.com/influxdata/influxdb/tsdb/cursors"
"github.com/influxdata/influxdb/v2/tsdb/cursors"
)
{{$isArray := .D.isArray}}
{{$isNotArray := not $isArray}}
Expand Down
2 changes: 1 addition & 1 deletion tsdb/tsm1/reader.gen.go.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package tsm1

import (
"github.com/influxdata/influxdb/tsdb/cursors"
"github.com/influxdata/influxdb/v2/tsdb/cursors"
)

{{range .}}
Expand Down

0 comments on commit 6e4cf7f

Please sign in to comment.