Skip to content

Commit

Permalink
update linters (istio#10809)
Browse files Browse the repository at this point in the history
Signed-off-by: Kuat Yessenov <[email protected]>
  • Loading branch information
kyessenov authored and istio-testing committed Jan 8, 2019
1 parent 45b6a79 commit 5169b97
Show file tree
Hide file tree
Showing 153 changed files with 428 additions and 420 deletions.
2 changes: 1 addition & 1 deletion addons/servicegraph/promgen/promgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"time"

"github.com/prometheus/client_golang/api"
"github.com/prometheus/client_golang/api/prometheus/v1"
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
"github.com/prometheus/common/model"

"istio.io/istio/addons/servicegraph"
Expand Down
2 changes: 1 addition & 1 deletion bin/linters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function install_gometalinter() {
}

function install_golangcilint() {
GOLANGCI_VERSION="v1.12.2"
GOLANGCI_VERSION="v1.12.4"
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b "$GOPATH"/bin "$GOLANGCI_VERSION"
golangci-lint --version
}
Expand Down
2 changes: 1 addition & 1 deletion galley/pkg/crd/validation/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package validation

import (
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/util/workqueue"
)
Expand Down
2 changes: 1 addition & 1 deletion galley/pkg/crd/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"regexp"
"time"

"github.com/hashicorp/go-multierror"
multierror "github.com/hashicorp/go-multierror"

"istio.io/istio/galley/cmd/shared"
"istio.io/istio/mixer/adapter"
Expand Down
2 changes: 1 addition & 1 deletion galley/pkg/crd/validation/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
admissionv1beta1 "k8s.io/api/admission/v1beta1"
"k8s.io/api/admissionregistration/v1beta1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
"k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
2 changes: 1 addition & 1 deletion galley/pkg/crd/validation/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/ghodss/yaml"
admissionv1beta1 "k8s.io/api/admission/v1beta1"
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down
2 changes: 1 addition & 1 deletion galley/pkg/kube/resourcespec.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package kube
import (
"fmt"

"k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
sc "k8s.io/apimachinery/pkg/runtime/schema"

"istio.io/istio/galley/pkg/kube/converter"
Expand Down
2 changes: 1 addition & 1 deletion galley/pkg/kube/resourcespec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"reflect"
"testing"

"k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
sc "k8s.io/apimachinery/pkg/runtime/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion galley/pkg/kube/source/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"time"

"github.com/hashicorp/go-multierror"
multierror "github.com/hashicorp/go-multierror"
"k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/wait"
Expand Down
2 changes: 1 addition & 1 deletion galley/pkg/server/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"

"github.com/fsnotify/fsnotify"
"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"

"istio.io/istio/pkg/filewatcher"
"istio.io/istio/pkg/mcp/server"
Expand Down
55 changes: 28 additions & 27 deletions galley/pkg/testing/testdata/dataset.gen.go

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

4 changes: 2 additions & 2 deletions istioctl/cmd/istioctl/deprecated_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"time"

"github.com/ghodss/yaml"
"github.com/hashicorp/go-multierror"
multierror "github.com/hashicorp/go-multierror"
"github.com/spf13/cobra"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/istioctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"

// import all known client auth plugins
_ "k8s.io/client-go/plugin/pkg/client/auth"
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/istioctl/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
promv1 "github.com/prometheus/client_golang/api/prometheus/v1"
"github.com/prometheus/common/model"
"github.com/spf13/cobra"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/portforward"
Expand Down
2 changes: 1 addition & 1 deletion istioctl/cmd/istioctl/proxyconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"io"

"github.com/spf13/cobra"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"

"istio.io/istio/istioctl/pkg/writer/envoy/clusters"
"istio.io/istio/istioctl/pkg/writer/envoy/configdump"
Expand Down
2 changes: 1 addition & 1 deletion istioctl/pkg/kubernetes/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"strings"

"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
Expand Down
2 changes: 1 addition & 1 deletion istioctl/pkg/writer/pilot/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"sort"
"text/tabwriter"

"istio.io/istio/pilot/pkg/proxy/envoy/v2"
v2 "istio.io/istio/pilot/pkg/proxy/envoy/v2"
)

// TLSCheckWriter enables printing of tls-check using a single Pilot response
Expand Down
2 changes: 1 addition & 1 deletion istioctl/pkg/writer/pilot/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/stretchr/testify/assert"

"istio.io/istio/pilot/pkg/proxy/envoy/v2"
v2 "istio.io/istio/pilot/pkg/proxy/envoy/v2"
"istio.io/istio/tests/util"
)

Expand Down
2 changes: 1 addition & 1 deletion istioctl/pkg/writer/pilot/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"text/tabwriter"

"istio.io/istio/pilot/pkg/proxy/envoy/v2"
v2 "istio.io/istio/pilot/pkg/proxy/envoy/v2"
)

// StatusWriter enables printing of sync status using multiple []byte Pilot responses
Expand Down
2 changes: 1 addition & 1 deletion istioctl/pkg/writer/pilot/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/stretchr/testify/assert"

"istio.io/istio/pilot/pkg/proxy/envoy/v2"
v2 "istio.io/istio/pilot/pkg/proxy/envoy/v2"
"istio.io/istio/tests/util"
)

Expand Down
2 changes: 1 addition & 1 deletion mixer/adapter/kubernetesenv/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"time"

appsv1 "k8s.io/api/apps/v1"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion mixer/adapter/kubernetesenv/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package kubernetesenv
import (
"testing"

"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/tools/cache"
Expand Down
2 changes: 1 addition & 1 deletion mixer/adapter/kubernetesenv/kubernetesenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"sync"
"time"

"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
k8s "k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth" // needed for auth
"k8s.io/client-go/tools/cache"
Expand Down
2 changes: 1 addition & 1 deletion mixer/adapter/kubernetesenv/kubernetesenv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

messagediff "gopkg.in/d4l3k/messagediff.v1"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes"
Expand Down

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

14 changes: 7 additions & 7 deletions mixer/pkg/attribute/list.gen.go

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

2 changes: 1 addition & 1 deletion mixer/pkg/config/mcp/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"istio.io/istio/mixer/pkg/config/store"
"istio.io/istio/mixer/pkg/runtime/config/constant"
"istio.io/istio/pkg/mcp/snapshot"
"istio.io/istio/pkg/mcp/testing"
mcptest "istio.io/istio/pkg/mcp/testing"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion mixer/pkg/il/interpreter/interpreterBenchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package interpreter
import (
"testing"

"istio.io/istio/mixer/pkg/il/testing"
ilt "istio.io/istio/mixer/pkg/il/testing"
"istio.io/istio/mixer/pkg/il/text"
)

Expand Down
2 changes: 1 addition & 1 deletion mixer/pkg/il/interpreter/interpreter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"istio.io/istio/mixer/pkg/attribute"
"istio.io/istio/mixer/pkg/il"
"istio.io/istio/mixer/pkg/il/testing"
ilt "istio.io/istio/mixer/pkg/il/testing"
"istio.io/istio/mixer/pkg/il/text"
)

Expand Down
2 changes: 1 addition & 1 deletion mixer/pkg/lang/compiled/expressionBenchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package compiled
import (
"testing"

"istio.io/istio/mixer/pkg/il/testing"
ilt "istio.io/istio/mixer/pkg/il/testing"
"istio.io/istio/mixer/pkg/lang/ast"
)

Expand Down
2 changes: 1 addition & 1 deletion mixer/pkg/lang/compiled/expressionbuilder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"testing"

istio_mixer_v1_config_descriptor "istio.io/api/policy/v1beta1"
"istio.io/istio/mixer/pkg/il/testing"
ilt "istio.io/istio/mixer/pkg/il/testing"
"istio.io/istio/mixer/pkg/lang/ast"
)

Expand Down
Loading

0 comments on commit 5169b97

Please sign in to comment.