Skip to content

Commit

Permalink
Lint import aliases using go-import-alias
Browse files Browse the repository at this point in the history
FIxes #3021

Signed-off-by: Shayegan Hooshyari <sh.hooshyari@gmail.com>
  • Loading branch information
Glyphack committed Nov 6, 2020
1 parent f4a403b commit 1b68b6d
Show file tree
Hide file tree
Showing 65 changed files with 127 additions and 127 deletions.
4 changes: 2 additions & 2 deletions apis/projectcontour/v1/httpproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
package v1

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// HTTPProxySpec defines the spec of the CRD.
Expand Down
2 changes: 1 addition & 1 deletion apis/projectcontour/v1/kubeconditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package v1
// This should be removed once we update to a version of client-go
// that includes a metav1.Condition type.
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

type ConditionStatus string
Expand Down
2 changes: 1 addition & 1 deletion apis/projectcontour/v1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
meta_v1 "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 apis/projectcontour/v1/tlscertificatedelegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// TLSCertificateDelegationSpec defines the spec of the CRD
Expand Down
2 changes: 1 addition & 1 deletion apis/projectcontour/v1alpha1/extensionservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package v1alpha1

import (
contour_api_v1 "github.com/projectcontour/contour/apis/projectcontour/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// ExtensionProtocolVersion is the version of the GRPC protocol used
Expand Down
2 changes: 1 addition & 1 deletion apis/projectcontour/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
meta_v1 "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 cmd/contour/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package main

import (
"github.com/projectcontour/contour/internal/envoy"
kingpin "gopkg.in/alecthomas/kingpin.v2"
kingpin_v2 "gopkg.in/alecthomas/kingpin.v2"
)

// registerBootstrap registers the bootstrap subcommand and flags
Expand Down
4 changes: 2 additions & 2 deletions cmd/contour/certgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"github.com/projectcontour/contour/internal/certgen"
"github.com/projectcontour/contour/internal/k8s"
"github.com/sirupsen/logrus"
kingpin "gopkg.in/alecthomas/kingpin.v2"
corev1 "k8s.io/api/core/v1"
kingpin_v2 "gopkg.in/alecthomas/kingpin.v2"
core_v1 "k8s.io/api/core/v1"
"k8s.io/client-go/kubernetes"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/contour/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"io/ioutil"
"os"

v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
api_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
"github.com/golang/protobuf/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
kingpin "gopkg.in/alecthomas/kingpin.v2"
kingpin_v2 "gopkg.in/alecthomas/kingpin.v2"
)

// Client holds the details for the cli client to connect to.
Expand Down
4 changes: 2 additions & 2 deletions cmd/contour/contour.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ package main
import (
"os"

resource "github.com/envoyproxy/go-control-plane/pkg/resource/v2"
resource_v2 "github.com/envoyproxy/go-control-plane/pkg/resource/v2"
"github.com/projectcontour/contour/internal/build"
envoy_v2 "github.com/projectcontour/contour/internal/envoy/v2"
envoy_v3 "github.com/projectcontour/contour/internal/envoy/v3"
"github.com/projectcontour/contour/internal/k8s"
"github.com/projectcontour/contour/pkg/config"
"github.com/sirupsen/logrus"
kingpin "gopkg.in/alecthomas/kingpin.v2"
kingpin_v2 "gopkg.in/alecthomas/kingpin.v2"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/contour/ingressstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
contour_api_v1 "github.com/projectcontour/contour/apis/projectcontour/v1"
"github.com/projectcontour/contour/internal/k8s"
"github.com/sirupsen/logrus"
v1 "k8s.io/api/core/v1"
core_v1 "k8s.io/api/core/v1"
"k8s.io/api/networking/v1beta1"
"k8s.io/apimachinery/pkg/runtime/schema"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/contour/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
"gopkg.in/alecthomas/kingpin.v2"
corev1 "k8s.io/api/core/v1"
networking_api_v1beta1 "k8s.io/api/networking/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
core_v1 "k8s.io/api/core/v1"
networking_v1beta1 "k8s.io/api/networking/v1beta1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
2 changes: 1 addition & 1 deletion hack/generate-metrics-doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/projectcontour/contour/internal/metrics"
"github.com/prometheus/client_golang/prometheus"
dto "github.com/prometheus/client_model/go"
go "github.com/prometheus/client_model/go"
)

// Collect all the label names for this metric and return them as
Expand Down
4 changes: 2 additions & 2 deletions internal/annotation/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"strconv"
"strings"

envoy_api_v2_auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
auth_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
"github.com/projectcontour/contour/internal/timeout"
"k8s.io/api/networking/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// DEFAULT_INGRESS_CLASS is the Contour default.
Expand Down
6 changes: 3 additions & 3 deletions internal/certgen/certgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"path"

"github.com/projectcontour/contour/internal/dag"
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
core_v1 "k8s.io/api/core/v1"
errors "k8s.io/apimachinery/pkg/api/errors"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/certgen/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"os"
"path"

corev1 "k8s.io/api/core/v1"
core_v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/serializer/json"
"k8s.io/client-go/kubernetes/scheme"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/contour/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/projectcontour/contour/internal/dag"
"github.com/projectcontour/contour/internal/k8s"
"github.com/sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EventHandler implements cache.ResourceEventHandler, filters k8s events towards
Expand Down
2 changes: 1 addition & 1 deletion internal/dag/accessors.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/projectcontour/contour/internal/annotation"
"github.com/projectcontour/contour/internal/k8s"
v1 "k8s.io/api/core/v1"
core_v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/dag/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (
"github.com/projectcontour/contour/internal/annotation"
"github.com/projectcontour/contour/internal/k8s"
"github.com/sirupsen/logrus"
v1 "k8s.io/api/core/v1"
core_v1 "k8s.io/api/core/v1"
"k8s.io/api/networking/v1beta1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/client-go/tools/cache"
serviceapis "sigs.k8s.io/service-apis/api/v1alpha1"
api_v1alpha1 "sigs.k8s.io/service-apis/api/v1alpha1"
)

// A KubernetesCache holds Kubernetes objects and associated configuration and produces
Expand Down
4 changes: 2 additions & 2 deletions internal/dag/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import (
"strings"
"time"

envoy_api_v2_auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
auth_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
contour_api_v1 "github.com/projectcontour/contour/apis/projectcontour/v1"
"github.com/projectcontour/contour/internal/status"
"github.com/projectcontour/contour/internal/timeout"
"github.com/projectcontour/contour/internal/xds"
v1 "k8s.io/api/core/v1"
core_v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/dag/extension_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/projectcontour/contour/internal/status"
"github.com/projectcontour/contour/internal/xds"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
core_v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/dag/httpproxy_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"sort"
"strings"

envoy_api_v2_auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
auth_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
contour_api_v1 "github.com/projectcontour/contour/apis/projectcontour/v1"
contour_api_v1alpha1 "github.com/projectcontour/contour/apis/projectcontour/v1alpha1"
"github.com/projectcontour/contour/internal/annotation"
Expand Down
2 changes: 1 addition & 1 deletion internal/dag/ingress_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package dag
import (
"strings"

envoy_api_v2_auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
auth_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
"github.com/projectcontour/contour/internal/annotation"
"github.com/projectcontour/contour/internal/k8s"
"github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion internal/dag/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"strings"

v1 "k8s.io/api/core/v1"
core_v1 "k8s.io/api/core/v1"
)

// CACertificateKey is the key name for accessing TLS CA certificate bundles in Kubernetes Secrets.
Expand Down
4 changes: 2 additions & 2 deletions internal/envoy/v2/accesslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
package v2

import (
accesslogv2 "github.com/envoyproxy/go-control-plane/envoy/config/accesslog/v2"
accesslog "github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2"
accesslog_v2 "github.com/envoyproxy/go-control-plane/envoy/config/accesslog/v2"
accesslog_v2 "github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2"
"github.com/envoyproxy/go-control-plane/pkg/wellknown"
_struct "github.com/golang/protobuf/ptypes/struct"
"github.com/projectcontour/contour/internal/protobuf"
Expand Down
4 changes: 2 additions & 2 deletions internal/envoy/v2/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
package v2

import (
envoy_api_v2_auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
envoy_api_v2_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
auth_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
core_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher"
"github.com/projectcontour/contour/internal/dag"
"github.com/projectcontour/contour/internal/envoy"
Expand Down
10 changes: 5 additions & 5 deletions internal/envoy/v2/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
"strings"
"time"

api "github.com/envoyproxy/go-control-plane/envoy/api/v2"
envoy_api_v2_auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
clusterv2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"
envoy_api_v2_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
envoy_api_bootstrap "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v2"
api_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
auth_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
cluster_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"
core_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
bootstrap_v2 "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v2"
matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher"
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes/any"
Expand Down
6 changes: 3 additions & 3 deletions internal/envoy/v2/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"strings"
"time"

v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
envoy_cluster "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"
envoy_api_v2_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
api_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
cluster_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/cluster"
core_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
envoy_type "github.com/envoyproxy/go-control-plane/envoy/type"
"github.com/projectcontour/contour/internal/dag"
"github.com/projectcontour/contour/internal/envoy"
Expand Down
6 changes: 3 additions & 3 deletions internal/envoy/v2/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
package v2

import (
v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
envoy_api_v2_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
envoy_api_v2_endpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"
api_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
core_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
endpoint_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"
"github.com/projectcontour/contour/internal/protobuf"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/envoy/v2/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package v2
import (
"time"

envoy_api_v2_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
core_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
"github.com/golang/protobuf/ptypes/duration"
"github.com/projectcontour/contour/internal/dag"
"github.com/projectcontour/contour/internal/envoy"
Expand Down
16 changes: 8 additions & 8 deletions internal/envoy/v2/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ import (
"strings"
"time"

v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
envoy_api_v2_auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
envoy_api_v2_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
envoy_api_v2_listener "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener"
accesslog "github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2"
api_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
auth_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
core_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
listener_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/listener"
accesslog_v2 "github.com/envoyproxy/go-control-plane/envoy/config/filter/accesslog/v2"
envoy_config_filter_http_ext_authz_v2 "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/ext_authz/v2"
lua "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/lua/v2"
http "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2"
tcp "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2"
lua_v2 "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/lua/v2"
manager_v2 "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/http_connection_manager/v2"
proxy_v2 "github.com/envoyproxy/go-control-plane/envoy/config/filter/network/tcp_proxy/v2"
envoy_type "github.com/envoyproxy/go-control-plane/envoy/type"
"github.com/envoyproxy/go-control-plane/pkg/wellknown"
"github.com/projectcontour/contour/internal/dag"
Expand Down
6 changes: 3 additions & 3 deletions internal/envoy/v2/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"sort"
"strings"

v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
envoy_api_v2_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
envoy_api_v2_route "github.com/envoyproxy/go-control-plane/envoy/api/v2/route"
api_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
core_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
route_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/route"
envoy_config_filter_http_ext_authz_v2 "github.com/envoyproxy/go-control-plane/envoy/config/filter/http/ext_authz/v2"
matcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher"
"github.com/golang/protobuf/ptypes/any"
Expand Down
4 changes: 2 additions & 2 deletions internal/envoy/v2/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
package v2

import (
envoy_api_v2_auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
envoy_api_v2_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
auth_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
core_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
"github.com/projectcontour/contour/internal/dag"
"github.com/projectcontour/contour/internal/envoy"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/envoy/v2/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
package v2

import (
envoy_api_v2_auth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
envoy_api_v2_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
auth_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
core_v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
"github.com/projectcontour/contour/internal/protobuf"
)

Expand Down

0 comments on commit 1b68b6d

Please sign in to comment.