Skip to content

Commit

Permalink
Replace custom gci section prefixes github.com/crossplane/crossplane-*
Browse files Browse the repository at this point in the history
with github.com/crossplane/upjet

- Run `gci write` to organize imports with the above change.

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
  • Loading branch information
ulucinar committed Nov 1, 2023
1 parent 4aeb57e commit b93f127
Show file tree
Hide file tree
Showing 58 changed files with 174 additions and 192 deletions.
3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ linters-settings:
sections:
- standard
- default
- prefix(github.com/crossplane/crossplane-runtime)
- prefix(github.com/crossplane/crossplane)
- prefix(github.com/crossplane/upjet)
- blank
- dot

Expand Down
3 changes: 2 additions & 1 deletion cmd/scraper/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
"os"
"path/filepath"

"github.com/crossplane/upjet/pkg/registry"
"gopkg.in/alecthomas/kingpin.v2"

"github.com/crossplane/upjet/pkg/registry"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion pkg/config/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ package config
import (
"strings"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/crossplane/upjet/pkg/registry"
tjname "github.com/crossplane/upjet/pkg/types/name"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions pkg/config/externalname_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import (
"context"
"testing"

"github.com/google/go-cmp/cmp"

"github.com/crossplane/crossplane-runtime/pkg/errors"
"github.com/crossplane/crossplane-runtime/pkg/test"
"github.com/google/go-cmp/cmp"
)

func TestGetExternalNameFromTemplated(t *testing.T) {
Expand Down
9 changes: 4 additions & 5 deletions pkg/config/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import (
"fmt"
"time"

xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
"github.com/crossplane/crossplane-runtime/pkg/fieldpath"
"github.com/crossplane/crossplane-runtime/pkg/reconciler/managed"
xpresource "github.com/crossplane/crossplane-runtime/pkg/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
"github.com/pkg/errors"
Expand All @@ -17,11 +21,6 @@ import (
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"

xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
"github.com/crossplane/crossplane-runtime/pkg/fieldpath"
"github.com/crossplane/crossplane-runtime/pkg/reconciler/managed"
xpresource "github.com/crossplane/crossplane-runtime/pkg/resource"

"github.com/crossplane/upjet/pkg/registry"
)

Expand Down
5 changes: 2 additions & 3 deletions pkg/config/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ import (
"fmt"
"testing"

"github.com/google/go-cmp/cmp"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/crossplane/crossplane-runtime/pkg/errors"
"github.com/crossplane/crossplane-runtime/pkg/fieldpath"
xpresource "github.com/crossplane/crossplane-runtime/pkg/resource"
"github.com/crossplane/crossplane-runtime/pkg/resource/fake"
"github.com/crossplane/crossplane-runtime/pkg/test"
"github.com/google/go-cmp/cmp"
"sigs.k8s.io/controller-runtime/pkg/client"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions pkg/controller/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ package controller
import (
"context"

"github.com/crossplane/upjet/pkg/controller/handler"
"github.com/crossplane/upjet/pkg/resource"
"github.com/crossplane/upjet/pkg/terraform"
xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
xpresource "github.com/crossplane/crossplane-runtime/pkg/resource"
"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
ctrl "sigs.k8s.io/controller-runtime/pkg/manager"

xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
xpresource "github.com/crossplane/crossplane-runtime/pkg/resource"
"github.com/crossplane/upjet/pkg/controller/handler"
"github.com/crossplane/upjet/pkg/resource"
"github.com/crossplane/upjet/pkg/terraform"
)

const (
Expand Down
12 changes: 6 additions & 6 deletions pkg/controller/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import (
"context"
"testing"

"github.com/crossplane/upjet/pkg/resource"
"github.com/crossplane/upjet/pkg/resource/fake"
tjerrors "github.com/crossplane/upjet/pkg/terraform/errors"
xpresource "github.com/crossplane/crossplane-runtime/pkg/resource"
xpfake "github.com/crossplane/crossplane-runtime/pkg/resource/fake"
"github.com/crossplane/crossplane-runtime/pkg/test"
"github.com/google/go-cmp/cmp"
"github.com/pkg/errors"
"sigs.k8s.io/controller-runtime/pkg/client"
ctrl "sigs.k8s.io/controller-runtime/pkg/manager"

xpresource "github.com/crossplane/crossplane-runtime/pkg/resource"
xpfake "github.com/crossplane/crossplane-runtime/pkg/resource/fake"
"github.com/crossplane/crossplane-runtime/pkg/test"
"github.com/crossplane/upjet/pkg/resource"
"github.com/crossplane/upjet/pkg/resource/fake"
tjerrors "github.com/crossplane/upjet/pkg/terraform/errors"
)

func TestAPICallbacksCreate(t *testing.T) {
Expand Down
16 changes: 8 additions & 8 deletions pkg/controller/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ import (
"context"
"time"

xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
"github.com/crossplane/crossplane-runtime/pkg/logging"
"github.com/crossplane/crossplane-runtime/pkg/reconciler/managed"
xpresource "github.com/crossplane/crossplane-runtime/pkg/resource"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/util/sets"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/crossplane/upjet/pkg/config"
"github.com/crossplane/upjet/pkg/controller/handler"
"github.com/crossplane/upjet/pkg/metrics"
"github.com/crossplane/upjet/pkg/resource"
"github.com/crossplane/upjet/pkg/resource/json"
"github.com/crossplane/upjet/pkg/terraform"
tferrors "github.com/crossplane/upjet/pkg/terraform/errors"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/util/sets"
"sigs.k8s.io/controller-runtime/pkg/client"

xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
"github.com/crossplane/crossplane-runtime/pkg/logging"
"github.com/crossplane/crossplane-runtime/pkg/reconciler/managed"
xpresource "github.com/crossplane/crossplane-runtime/pkg/resource"
)

const (
Expand Down
22 changes: 11 additions & 11 deletions pkg/controller/external_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ import (
"context"
"testing"

"github.com/crossplane/upjet/pkg/config"
"github.com/crossplane/upjet/pkg/resource"
"github.com/crossplane/upjet/pkg/resource/fake"
"github.com/crossplane/upjet/pkg/resource/json"
"github.com/crossplane/upjet/pkg/terraform"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"

xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
"github.com/crossplane/crossplane-runtime/pkg/logging"
xpmeta "github.com/crossplane/crossplane-runtime/pkg/meta"
"github.com/crossplane/crossplane-runtime/pkg/reconciler/managed"
xpresource "github.com/crossplane/crossplane-runtime/pkg/resource"
xpfake "github.com/crossplane/crossplane-runtime/pkg/resource/fake"
"github.com/crossplane/crossplane-runtime/pkg/test"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/crossplane/upjet/pkg/config"
"github.com/crossplane/upjet/pkg/resource"
"github.com/crossplane/upjet/pkg/resource/fake"
"github.com/crossplane/upjet/pkg/resource/json"
"github.com/crossplane/upjet/pkg/terraform"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions pkg/controller/handler/eventhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ import (
"sync"
"time"

"github.com/crossplane/crossplane-runtime/pkg/logging"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/util/workqueue"
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/handler"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

"github.com/crossplane/crossplane-runtime/pkg/logging"
)

const NoRateLimiter = ""
Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"crypto/tls"
"time"

"github.com/crossplane/upjet/pkg/config"
"github.com/crossplane/upjet/pkg/terraform"
"github.com/crossplane/crossplane-runtime/pkg/controller"
"k8s.io/apimachinery/pkg/runtime/schema"

"github.com/crossplane/crossplane-runtime/pkg/controller"
"github.com/crossplane/upjet/pkg/config"
"github.com/crossplane/upjet/pkg/terraform"
)

// Options contains incriminating options for a given Upjet controller instance.
Expand Down
7 changes: 3 additions & 4 deletions pkg/migration/api_steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ import (
"fmt"
"strconv"

"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
"github.com/crossplane/crossplane-runtime/pkg/meta"
"github.com/crossplane/crossplane-runtime/pkg/resource/unstructured/claim"
"github.com/crossplane/crossplane-runtime/pkg/resource/unstructured/composite"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions pkg/migration/configurationmetadata_steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import (
"fmt"
"strconv"

"github.com/pkg/errors"

xpmetav1 "github.com/crossplane/crossplane/apis/pkg/meta/v1"
xpmetav1alpha1 "github.com/crossplane/crossplane/apis/pkg/meta/v1alpha1"
"github.com/pkg/errors"
)

const (
Expand Down
5 changes: 2 additions & 3 deletions pkg/migration/configurationpackage_steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ package migration
import (
"fmt"

"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
"github.com/crossplane/crossplane-runtime/pkg/fieldpath"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)

const (
Expand Down
18 changes: 8 additions & 10 deletions pkg/migration/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,22 @@ package migration
import (
"fmt"

"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
metav1 "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"
"k8s.io/apimachinery/pkg/util/json"
k8sjson "sigs.k8s.io/json"

"github.com/crossplane/crossplane-runtime/pkg/fieldpath"
xpmeta "github.com/crossplane/crossplane-runtime/pkg/meta"
"github.com/crossplane/crossplane-runtime/pkg/resource"

xpv1 "github.com/crossplane/crossplane/apis/apiextensions/v1"
xpmetav1 "github.com/crossplane/crossplane/apis/pkg/meta/v1"
xpmetav1alpha1 "github.com/crossplane/crossplane/apis/pkg/meta/v1alpha1"
xppkgv1 "github.com/crossplane/crossplane/apis/pkg/v1"
xppkgv1beta1 "github.com/crossplane/crossplane/apis/pkg/v1beta1"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
metav1 "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"
"k8s.io/apimachinery/pkg/util/json"
k8sjson "sigs.k8s.io/json"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/migration/fake/objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
package fake

import (
"github.com/crossplane/upjet/pkg/migration/fake/mocks"
xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
"k8s.io/apimachinery/pkg/runtime/schema"

xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
"github.com/crossplane/upjet/pkg/migration/fake/mocks"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions pkg/migration/fork_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ package migration
import (
"os"

"github.com/crossplane/crossplane-runtime/pkg/logging"
"github.com/pkg/errors"
"k8s.io/utils/exec"

"github.com/crossplane/crossplane-runtime/pkg/logging"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions pkg/migration/fork_executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ package migration
import (
"testing"

"github.com/crossplane/crossplane-runtime/pkg/test"
"github.com/google/go-cmp/cmp"
"github.com/pkg/errors"
k8sExec "k8s.io/utils/exec"
testingexec "k8s.io/utils/exec/testing"

"github.com/crossplane/crossplane-runtime/pkg/test"
)

var (
Expand Down
1 change: 0 additions & 1 deletion pkg/migration/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package migration

import (
"github.com/crossplane/crossplane-runtime/pkg/resource"

xpv1 "github.com/crossplane/crossplane/apis/apiextensions/v1"
xpmetav1 "github.com/crossplane/crossplane/apis/pkg/meta/v1"
xpmetav1alpha1 "github.com/crossplane/crossplane/apis/pkg/meta/v1alpha1"
Expand Down
3 changes: 1 addition & 2 deletions pkg/migration/patches.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ import (
"regexp"
"strings"

xpv1 "github.com/crossplane/crossplane/apis/apiextensions/v1"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

xpv1 "github.com/crossplane/crossplane/apis/apiextensions/v1"
)

var (
Expand Down
12 changes: 5 additions & 7 deletions pkg/migration/plan_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ import (
"reflect"
"time"

"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/rand"

"github.com/crossplane/crossplane-runtime/pkg/fieldpath"
"github.com/crossplane/crossplane-runtime/pkg/resource"

xpv1 "github.com/crossplane/crossplane/apis/apiextensions/v1"
xpmetav1 "github.com/crossplane/crossplane/apis/pkg/meta/v1"
xpmetav1alpha1 "github.com/crossplane/crossplane/apis/pkg/meta/v1alpha1"
xppkgv1 "github.com/crossplane/crossplane/apis/pkg/v1"
xppkgv1beta1 "github.com/crossplane/crossplane/apis/pkg/v1beta1"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/rand"
)

const (
Expand Down
Loading

0 comments on commit b93f127

Please sign in to comment.