Skip to content

Commit

Permalink
Fix gofmt on imports ordering
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
  • Loading branch information
vdemeester authored and tekton-robot committed Jul 25, 2019
1 parent 52672ae commit 42bc3fb
Show file tree
Hide file tree
Showing 68 changed files with 96 additions and 96 deletions.
2 changes: 1 addition & 1 deletion cmd/creds-init/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package main
import (
"flag"

"knative.dev/pkg/logging"
"github.com/tektoncd/pipeline/pkg/credentials"
"github.com/tektoncd/pipeline/pkg/credentials/dockercreds"
"github.com/tektoncd/pipeline/pkg/credentials/gitcreds"
"knative.dev/pkg/logging"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/git-init/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package main
import (
"flag"

"knative.dev/pkg/logging"
"github.com/tektoncd/pipeline/pkg/git"
"knative.dev/pkg/logging"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/config/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
logtesting "knative.dev/pkg/logging/testing"
test "github.com/tektoncd/pipeline/pkg/reconciler/testing"
logtesting "knative.dev/pkg/logging/testing"
)

func TestStoreLoadWithContext(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/cluster_task_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package v1alpha1

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

// Check that Task may be validated and defaulted.
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/pipeline/v1alpha1/condition_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
package v1alpha1

import (
"knative.dev/pkg/apis"
duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1"
)

// Check that Task may be validated and defaulted.
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/pipeline/v1alpha1/condition_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ package v1alpha1

import (
"context"
"knative.dev/pkg/apis"

"k8s.io/apimachinery/pkg/api/equality"
"knative.dev/pkg/apis"
)

func (c Condition) Validate(ctx context.Context) *apis.FieldError {
Expand Down
5 changes: 3 additions & 2 deletions pkg/apis/pipeline/v1alpha1/condition_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ package v1alpha1

import (
"context"
"testing"

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"knative.dev/pkg/apis"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"testing"
"knative.dev/pkg/apis"
)

func TestCondition_Validate(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/metadata_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package v1alpha1
import (
"strings"

"knative.dev/pkg/apis"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
)

const maxLength = 63
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/pipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package v1alpha1

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

// PipelineSpec defines the desired state of Pipeline.
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/pipeline_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"context"
"fmt"

"knative.dev/pkg/apis"
"github.com/tektoncd/pipeline/pkg/list"
"github.com/tektoncd/pipeline/pkg/templating"
"golang.org/x/xerrors"
"k8s.io/apimachinery/pkg/api/equality"
"knative.dev/pkg/apis"
)

// Validate checks that the Pipeline structure is valid but does not validate
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/pipelineresource_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"context"
"strings"

"knative.dev/pkg/apis"
"k8s.io/apimachinery/pkg/api/equality"
"knative.dev/pkg/apis"
)

func (r *PipelineResource) Validate(ctx context.Context) *apis.FieldError {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"knative.dev/pkg/apis"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
tb "github.com/tektoncd/pipeline/test/builder"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
)

func TestResourceValidation_Invalid(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/pipelinerun_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"time"

"github.com/google/go-cmp/cmp"
"knative.dev/pkg/apis"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
)

func TestPipelineRunStatusConditions(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/pipelinerun_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"context"
"fmt"

"knative.dev/pkg/apis"
"k8s.io/apimachinery/pkg/api/equality"
"knative.dev/pkg/apis"
)

// Validate pipelinerun
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/pipelinerun_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"time"

"github.com/google/go-cmp/cmp"
"knative.dev/pkg/apis"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
)

func TestPipelineRun_Invalidate(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/resource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ limitations under the License.
package v1alpha1

import (
"knative.dev/pkg/apis"
"golang.org/x/xerrors"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
)

// PipelineResourceType represents the type of endpoint the pipelineResource is, so that the
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/result_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"knative.dev/pkg/apis"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
"knative.dev/pkg/apis"
)

func TestValidate(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/pipeline/v1alpha1/task_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ package v1alpha1

import (
corev1 "k8s.io/api/core/v1"

"knative.dev/pkg/apis"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
)

func (t *Task) TaskSpec() TaskSpec {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/task_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import (
"fmt"
"strings"

"knative.dev/pkg/apis"
"github.com/tektoncd/pipeline/pkg/merge"
"github.com/tektoncd/pipeline/pkg/templating"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
"k8s.io/apimachinery/pkg/util/validation"
"knative.dev/pkg/apis"
)

func (t *Task) Validate(ctx context.Context) *apis.FieldError {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/task_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"knative.dev/pkg/apis"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
corev1 "k8s.io/api/core/v1"
"knative.dev/pkg/apis"
)

var validResource = v1alpha1.TaskResource{
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/pipeline/v1alpha1/taskrun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"fmt"
"time"

"knative.dev/pkg/apis"
duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
duckv1beta1 "knative.dev/pkg/apis/duck/v1beta1"
)

// Check that TaskRun may be validated and defaulted.
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/taskrun_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"time"

"github.com/google/go-cmp/cmp"
"knative.dev/pkg/apis"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"

tb "github.com/tektoncd/pipeline/test/builder"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/taskrun_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"fmt"
"strings"

"knative.dev/pkg/apis"
"k8s.io/apimachinery/pkg/api/equality"
"knative.dev/pkg/apis"
)

// Validate taskrun
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/taskrun_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"time"

"github.com/google/go-cmp/cmp"
"knative.dev/pkg/apis"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"

tb "github.com/tektoncd/pipeline/test/builder"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1alpha1/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package v1alpha1_test
import (
"testing"

"knative.dev/pkg/webhook"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
"knative.dev/pkg/webhook"
)

func TestTypes(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/artifacts/artifact_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
logtesting "knative.dev/pkg/logging/testing"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
"github.com/tektoncd/pipeline/pkg/system"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
fakek8s "k8s.io/client-go/kubernetes/fake"
logtesting "knative.dev/pkg/logging/testing"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ limitations under the License.
package reconciler

import (
"knative.dev/pkg/apis"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/tools/record"
"knative.dev/pkg/apis"
)

// EmitEvent emits success or failed event for object
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"testing"
"time"

"knative.dev/pkg/apis"
corev1 "k8s.io/api/core/v1"
"k8s.io/client-go/tools/record"
"knative.dev/pkg/apis"
)

func Test_EmitEvent(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/reconciler/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import (
"strings"
"testing"

"knative.dev/pkg/apis"
rtesting "knative.dev/pkg/reconciler/testing"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
"github.com/tektoncd/pipeline/pkg/reconciler/v1alpha1/pipelinerun/resources"
"github.com/tektoncd/pipeline/test"
Expand All @@ -32,6 +30,8 @@ import (
"go.uber.org/zap/zaptest/observer"
corev1 "k8s.io/api/core/v1"
"k8s.io/client-go/tools/record"
"knative.dev/pkg/apis"
rtesting "knative.dev/pkg/reconciler/testing"
)

// Test case for providing recorder in the option
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package reconciler

import (
"knative.dev/pkg/controller"
"go.uber.org/zap"
"knative.dev/pkg/controller"
)

// MustNewStatsReporter creates a new instance of StatsReporter. Panics if creation fails.
Expand Down
4 changes: 2 additions & 2 deletions pkg/reconciler/timeout_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"testing"
"time"

"knative.dev/pkg/apis"
rtesting "knative.dev/pkg/reconciler/testing"
"github.com/tektoncd/pipeline/pkg/apis/config"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
"github.com/tektoncd/pipeline/test"
Expand All @@ -17,6 +15,8 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
"knative.dev/pkg/apis"
rtesting "knative.dev/pkg/reconciler/testing"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/v1alpha1/pipelinerun/cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import (
"strings"
"time"

"knative.dev/pkg/apis"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
clientset "github.com/tektoncd/pipeline/pkg/client/clientset/versioned"
"github.com/tektoncd/pipeline/pkg/reconciler/v1alpha1/pipelinerun/resources"
"golang.org/x/xerrors"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
)

// cancelPipelineRun makrs the PipelineRun as cancelled and any resolved taskrun too.
Expand Down
4 changes: 2 additions & 2 deletions pkg/reconciler/v1alpha1/pipelinerun/cancel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (
"context"
"testing"

"knative.dev/pkg/apis"
rtesting "knative.dev/pkg/reconciler/testing"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
"github.com/tektoncd/pipeline/pkg/reconciler/v1alpha1/pipelinerun/resources"
"github.com/tektoncd/pipeline/test"
tb "github.com/tektoncd/pipeline/test/builder"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
rtesting "knative.dev/pkg/reconciler/testing"
)

func TestCancelPipelineRun(t *testing.T) {
Expand Down
Loading

0 comments on commit 42bc3fb

Please sign in to comment.