Skip to content

Commit

Permalink
refactor: fixed formatting in master so ci check passes
Browse files Browse the repository at this point in the history
  • Loading branch information
FUSAKLA committed Jan 14, 2019
1 parent ee64b9e commit b8752ef
Show file tree
Hide file tree
Showing 29 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion benchmark/cmd/thanosbench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/go-kit/kit/log"
"github.com/prometheus/common/version"
"gopkg.in/alecthomas/kingpin.v2"
kingpin "gopkg.in/alecthomas/kingpin.v2"
"k8s.io/client-go/tools/clientcmd"
)

Expand Down
8 changes: 4 additions & 4 deletions benchmark/cmd/thanosbench/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/pkg/errors"
"github.com/prometheus/common/model"
prom "github.com/prometheus/prometheus/config"
"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -208,7 +208,7 @@ func createPrometheus(opts *opts, name string, bucket string) *appsv1.StatefulSe
Name: name,
Namespace: promNamespace,
Labels: map[string]string{
"app": name,
"app": name,
"thanos-gossip-member": "true",
},
}
Expand Down Expand Up @@ -371,7 +371,7 @@ func createThanosQuery(opts *opts) (*v1.Service, *v1.Pod) {
Name: "thanos-query",
Namespace: thanosNamespace,
Labels: map[string]string{
"app": "thanos-query",
"app": "thanos-query",
"thanos-gossip-member": "true",
},
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import (
"text/template"
"time"

opentracing "github.com/opentracing/opentracing-go"
"github.com/prometheus/tsdb/labels"
kingpin "gopkg.in/alecthomas/kingpin.v2"

"github.com/go-kit/kit/log"
"github.com/improbable-eng/thanos/pkg/block"
Expand All @@ -20,12 +22,10 @@ import (
"github.com/oklog/run"
"github.com/oklog/ulid"
"github.com/olekukonko/tablewriter"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/text/language"
"golang.org/x/text/message"
"gopkg.in/alecthomas/kingpin.v2"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
"github.com/improbable-eng/thanos/pkg/objstore/client"
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/oklog/run"
"github.com/opentracing/opentracing-go"
opentracing "github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/tsdb"
"gopkg.in/alecthomas/kingpin.v2"
kingpin "gopkg.in/alecthomas/kingpin.v2"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/downsample.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
"path/filepath"
"time"

opentracing "github.com/opentracing/opentracing-go"
"github.com/prometheus/tsdb/chunkenc"
kingpin "gopkg.in/alecthomas/kingpin.v2"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
Expand All @@ -19,11 +21,9 @@ import (
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/oklog/run"
"github.com/oklog/ulid"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/tsdb"
"gopkg.in/alecthomas/kingpin.v2"
)

func registerDownsample(m map[string]setupFunc, app *kingpin.Application, name string) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"gopkg.in/alecthomas/kingpin.v2"
kingpin "gopkg.in/alecthomas/kingpin.v2"
)

func regCommonServerFlags(cmd *kingpin.CmdClause) (
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"github.com/go-kit/kit/log/level"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
"github.com/grpc-ecosystem/go-grpc-prometheus"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/improbable-eng/thanos/pkg/tracing"
"github.com/oklog/run"
"github.com/opentracing/opentracing-go"
opentracing "github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
Expand Down
10 changes: 5 additions & 5 deletions cmd/thanos/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ import (

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-prometheus"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/improbable-eng/thanos/pkg/cluster"
"github.com/improbable-eng/thanos/pkg/discovery/cache"
"github.com/improbable-eng/thanos/pkg/discovery/dns"
"github.com/improbable-eng/thanos/pkg/query"
"github.com/improbable-eng/thanos/pkg/query/api"
v1 "github.com/improbable-eng/thanos/pkg/query/api"
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/improbable-eng/thanos/pkg/store"
"github.com/improbable-eng/thanos/pkg/store/storepb"
"github.com/improbable-eng/thanos/pkg/tracing"
"github.com/improbable-eng/thanos/pkg/ui"
"github.com/oklog/run"
"github.com/opentracing/opentracing-go"
opentracing "github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/route"
Expand All @@ -38,7 +38,7 @@ import (
"github.com/prometheus/tsdb/labels"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"gopkg.in/alecthomas/kingpin.v2"
kingpin "gopkg.in/alecthomas/kingpin.v2"
)

// registerQuery registers a query command.
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import (
"time"

"github.com/improbable-eng/thanos/pkg/extprom"
opentracing "github.com/opentracing/opentracing-go"
kingpin "gopkg.in/alecthomas/kingpin.v2"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
Expand All @@ -36,7 +38,6 @@ import (
"github.com/improbable-eng/thanos/pkg/tracing"
"github.com/improbable-eng/thanos/pkg/ui"
"github.com/oklog/run"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
Expand All @@ -50,7 +51,6 @@ import (
"github.com/prometheus/prometheus/util/strutil"
"github.com/prometheus/tsdb/labels"
"google.golang.org/grpc"
"gopkg.in/alecthomas/kingpin.v2"
)

// registerRule registers a rule command.
Expand Down
6 changes: 3 additions & 3 deletions cmd/thanos/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import (
"github.com/improbable-eng/thanos/pkg/store"
"github.com/improbable-eng/thanos/pkg/store/storepb"
"github.com/oklog/run"
"github.com/opentracing/opentracing-go"
opentracing "github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/tsdb/labels"
"google.golang.org/grpc"
"gopkg.in/alecthomas/kingpin.v2"
"gopkg.in/yaml.v2"
kingpin "gopkg.in/alecthomas/kingpin.v2"
yaml "gopkg.in/yaml.v2"
)

func registerSidecar(m map[string]setupFunc, app *kingpin.Application, name string) {
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"github.com/improbable-eng/thanos/pkg/store"
"github.com/improbable-eng/thanos/pkg/store/storepb"
"github.com/oklog/run"
"github.com/opentracing/opentracing-go"
opentracing "github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"google.golang.org/grpc"
"gopkg.in/alecthomas/kingpin.v2"
kingpin "gopkg.in/alecthomas/kingpin.v2"
)

// registerStore registers a store command.
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/advertise.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"strconv"

"github.com/hashicorp/go-sockaddr"
sockaddr "github.com/hashicorp/go-sockaddr"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/fortytw2/leaktest"
"github.com/go-kit/kit/log"
"github.com/hashicorp/go-sockaddr"
sockaddr "github.com/hashicorp/go-sockaddr"
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/improbable-eng/thanos/pkg/store/storepb"
"github.com/improbable-eng/thanos/pkg/testutil"
Expand Down
2 changes: 1 addition & 1 deletion pkg/objstore/client/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/improbable-eng/thanos/pkg/objstore/swift"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"
)

type ObjProvider string
Expand Down
2 changes: 1 addition & 1 deletion pkg/objstore/cos/cos.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/go-kit/kit/log"
"github.com/improbable-eng/thanos/pkg/objstore"
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/mozillazg/go-cos"
cos "github.com/mozillazg/go-cos"
"github.com/pkg/errors"
yaml "gopkg.in/yaml.v2"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/objstore/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/go-kit/kit/log"
"github.com/improbable-eng/thanos/pkg/objstore"
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/minio/minio-go"
minio "github.com/minio/minio-go"
"github.com/minio/minio-go/pkg/credentials"
"github.com/minio/minio-go/pkg/encrypt"
"github.com/pkg/errors"
Expand Down Expand Up @@ -106,7 +106,7 @@ func NewBucketWithConfig(logger log.Logger, config Config, component string) (*B
} else {
chain = []credentials.Provider{
&credentials.EnvAWS{},
&credentials.FileAWSCredentials{},
&credentials.FileAWSCredentials{},
&credentials.IAM{
Client: &http.Client{
Transport: http.DefaultTransport,
Expand Down
2 changes: 1 addition & 1 deletion pkg/objstore/swift/swift.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects"
"github.com/gophercloud/gophercloud/pagination"
"github.com/pkg/errors"
"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"
)

// DirDelim is the delimiter used to model a directory structure in an object store bucket.
Expand Down
2 changes: 1 addition & 1 deletion pkg/query/api/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/improbable-eng/thanos/pkg/query"
"github.com/improbable-eng/thanos/pkg/runutil"
"github.com/improbable-eng/thanos/pkg/tracing"
"github.com/opentracing/opentracing-go"
opentracing "github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
Expand Down
2 changes: 1 addition & 1 deletion pkg/query/api/v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/go-kit/kit/log"
"github.com/improbable-eng/thanos/pkg/query"
"github.com/improbable-eng/thanos/pkg/testutil"
"github.com/opentracing/opentracing-go"
opentracing "github.com/opentracing/opentracing-go"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/timestamp"
Expand Down
4 changes: 2 additions & 2 deletions pkg/store/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ func (p *PrometheusStore) Series(r *storepb.SeriesRequest, s storepb.Store_Serie
return nil
}

func(p *PrometheusStore) chunkSamples(series prompb.TimeSeries, samplesPerChunk int) ([]storepb.AggrChunk, error) {
func (p *PrometheusStore) chunkSamples(series prompb.TimeSeries, samplesPerChunk int) ([]storepb.AggrChunk, error) {
var aggregatedChunks []storepb.AggrChunk
samples := series.Samples

for len(samples) > 0 {
chunkSize := len(samples)
if chunkSize > samplesPerChunk {
if chunkSize > samplesPerChunk {
chunkSize = samplesPerChunk
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/store/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func (s *ProxyStore) LabelValues(ctx context.Context, r *storepb.LabelValuesRequ
store := st
g.Go(func() error {
resp, err := store.LabelValues(gctx, &storepb.LabelValuesRequest{
Label: r.Label,
Label: r.Label,
PartialResponseDisabled: r.PartialResponseDisabled,
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ func TestProxyStore_LabelValues(t *testing.T) {

ctx := context.Background()
req := &storepb.LabelValuesRequest{
Label: "a",
Label: "a",
PartialResponseDisabled: true,
}
resp, err := q.LabelValues(ctx, req)
Expand Down
8 changes: 4 additions & 4 deletions pkg/tracing/gct.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (

"fmt"

"cloud.google.com/go/trace/apiv1"
trace "cloud.google.com/go/trace/apiv1"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/lovoo/gcloud-opentracing"
"github.com/opentracing/basictracer-go"
"github.com/opentracing/opentracing-go"
gcloudtracer "github.com/lovoo/gcloud-opentracing"
basictracer "github.com/opentracing/basictracer-go"
opentracing "github.com/opentracing/opentracing-go"
)

type gcloudRecorderLogger struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/tracing/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package tracing
import (
"context"

"github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
"github.com/opentracing/opentracing-go"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
opentracing "github.com/opentracing/opentracing-go"
"google.golang.org/grpc"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/tracing/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/opentracing/opentracing-go"
opentracing "github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/tracing/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"context"

"github.com/opentracing/basictracer-go"
"github.com/opentracing/opentracing-go"
basictracer "github.com/opentracing/basictracer-go"
opentracing "github.com/opentracing/opentracing-go"
"github.com/prometheus/common/version"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/tracing/tracing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/fortytw2/leaktest"
"github.com/improbable-eng/thanos/pkg/testutil"
"github.com/opentracing/basictracer-go"
basictracer "github.com/opentracing/basictracer-go"
)

// This test shows that if sample factor will enable tracing on client process, even when it would be disabled on server
Expand Down
4 changes: 2 additions & 2 deletions scripts/bucketcfggen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/improbable-eng/thanos/pkg/objstore/gcs"
"github.com/improbable-eng/thanos/pkg/objstore/s3"
"github.com/pkg/errors"
"gopkg.in/alecthomas/kingpin.v2"
"gopkg.in/yaml.v2"
kingpin "gopkg.in/alecthomas/kingpin.v2"
yaml "gopkg.in/yaml.v2"
)

var (
Expand Down

0 comments on commit b8752ef

Please sign in to comment.