Skip to content

Commit

Permalink
migrate client-pkg to client/pkg (#2477)
Browse files Browse the repository at this point in the history
* migrate

Signed-off-by: David Fridrich <[email protected]>

* migrate more

Signed-off-by: David Fridrich <[email protected]>

* sort imports

Signed-off-by: David Fridrich <[email protected]>

---------

Signed-off-by: David Fridrich <[email protected]>
  • Loading branch information
gauron99 authored Sep 4, 2024
1 parent 799de30 commit a13056e
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 21 deletions.
3 changes: 2 additions & 1 deletion cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import (
"github.com/ory/viper"
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/api/resource"
"knative.dev/client-pkg/pkg/util"
"knative.dev/client/pkg/util"

"knative.dev/func/pkg/builders"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/spf13/pflag"
"golang.org/x/term"
"k8s.io/apimachinery/pkg/util/sets"
"knative.dev/client-pkg/pkg/util"
"knative.dev/client/pkg/util"

"knative.dev/func/cmd/templates"
"knative.dev/func/pkg/config"
Expand Down
2 changes: 1 addition & 1 deletion cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"

"github.com/ory/viper"
"knative.dev/client-pkg/pkg/util"
"knative.dev/client/pkg/util"

fn "knative.dev/func/pkg/functions"
. "knative.dev/func/pkg/testing"
Expand Down
4 changes: 2 additions & 2 deletions cmd/templates/command_groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"github.com/spf13/cobra"
"gotest.tools/v3/assert"

"knative.dev/client-pkg/pkg/util"
"knative.dev/client-pkg/pkg/util/test"
"knative.dev/client/pkg/util"
"knative.dev/client/pkg/util/test"
)

var groups = CommandGroups{
Expand Down
4 changes: 2 additions & 2 deletions cmd/templates/template_engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/spf13/cobra"
"gotest.tools/v3/assert"

"knative.dev/client-pkg/pkg/util"
"knative.dev/client-pkg/pkg/util/test"
"knative.dev/client/pkg/util"
"knative.dev/client/pkg/util/test"
)

type testData struct {
Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ require (
k8s.io/apimachinery v0.30.3
k8s.io/client-go v1.5.2
k8s.io/klog/v2 v2.130.1
knative.dev/client-pkg v0.0.0-20240903141311-eb73a58a643f
knative.dev/client/pkg v0.0.0-20240903145132-9728a1e0fdbe
knative.dev/eventing v0.42.1-0.20240902133926-07d379056bd8
knative.dev/hack v0.0.0-20240814130635-06f7aff93954
knative.dev/pkg v0.0.0-20240815051656-89743d9bbf7c
Expand Down Expand Up @@ -285,7 +285,8 @@ require (
k8s.io/cli-runtime v0.29.2 // indirect
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
knative.dev/networking v0.0.0-20240808015019-d4c57cd4a1b3 // indirect
knative.dev/client-pkg v0.0.0-20240903141311-eb73a58a643f // indirect
knative.dev/networking v0.0.0-20240815142417-37fdbdd0854b // indirect
sigs.k8s.io/controller-runtime v0.7.2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2737,12 +2737,14 @@ k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/client-pkg v0.0.0-20240903141311-eb73a58a643f h1:z9Oxc+vpsoYrsyovO8agFR0E9k4ADljEHbphHw/I9DA=
knative.dev/client-pkg v0.0.0-20240903141311-eb73a58a643f/go.mod h1:LZur1NaQ0sSun/QEZ5R2I99bS5lOW//Y68JLpUEpkJc=
knative.dev/client/pkg v0.0.0-20240903145132-9728a1e0fdbe h1:WPcavuBgU/gOqyfiHrkL0zNvhUqrbDrEE+gCtNZ1qYw=
knative.dev/client/pkg v0.0.0-20240903145132-9728a1e0fdbe/go.mod h1:JR3XomuVf2cBqgvXFONkX6Ebf1/gJwUnl/1OH47U18g=
knative.dev/eventing v0.42.1-0.20240902133926-07d379056bd8 h1:doFWIRq/Gsoha36qpKBDv6gHqV4/wzlcvtvy2M/MJ74=
knative.dev/eventing v0.42.1-0.20240902133926-07d379056bd8/go.mod h1:Clx8z37Nwg321H9+vGNxp5C6bVdo4l4XM5g6T5CgZVI=
knative.dev/hack v0.0.0-20240814130635-06f7aff93954 h1:dGMK5VoL75szvrYQTL9NqhPYHu1f5dGaXx1hJI8fAFM=
knative.dev/hack v0.0.0-20240814130635-06f7aff93954/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
knative.dev/networking v0.0.0-20240808015019-d4c57cd4a1b3 h1:KfIea0RVx0QfHK0gHruJfacT2kBVb4hZE8Sgzs32KKo=
knative.dev/networking v0.0.0-20240808015019-d4c57cd4a1b3/go.mod h1:QsOtfjxoHEzWvLa8y+mSts95UKUmzTvmgPxWoi7XHMQ=
knative.dev/networking v0.0.0-20240815142417-37fdbdd0854b h1:ws/Jeho6on84+5tfNKLAKriVVGIwivHbgPEtZjBfcs0=
knative.dev/networking v0.0.0-20240815142417-37fdbdd0854b/go.mod h1:2eMQVGLBZ5Kj1C4kKPuPhO7BsUeF6fkmhZFDQPIP+88=
knative.dev/pkg v0.0.0-20240815051656-89743d9bbf7c h1:2crXVk4FG0dSG6WHaIT+WKbUzn7qG2wn0AfYmvA22zs=
knative.dev/pkg v0.0.0-20240815051656-89743d9bbf7c/go.mod h1:cI2RPEEHZk+/dBpfHobs0aBdPA1mMZVUVWnGAc8NSzM=
knative.dev/serving v0.42.1-0.20240903112117-f07e3d6f307e h1:9jeMRAUZaD3/T8LxH0gLWom7WUMcS2q00GUzqCNEQic=
Expand Down
4 changes: 2 additions & 2 deletions pkg/knative/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"time"

clienteventingv1 "knative.dev/client-pkg/pkg/eventing/v1"
clientservingv1 "knative.dev/client-pkg/pkg/serving/v1"
clienteventingv1 "knative.dev/client/pkg/eventing/v1"
clientservingv1 "knative.dev/client/pkg/serving/v1"
eventingv1 "knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1"
servingv1 "knative.dev/serving/pkg/client/clientset/versioned/typed/serving/v1"

Expand Down
10 changes: 5 additions & 5 deletions pkg/knative/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

clienteventingv1 "knative.dev/client-pkg/pkg/eventing/v1"
clienteventingv1 "knative.dev/client/pkg/eventing/v1"
eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1"
duckv1 "knative.dev/pkg/apis/duck/v1"

Expand All @@ -19,10 +19,10 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/rand"
"k8s.io/apimachinery/pkg/util/sets"
"knative.dev/client-pkg/pkg/flags"
servingclientlib "knative.dev/client-pkg/pkg/serving"
clientservingv1 "knative.dev/client-pkg/pkg/serving/v1"
"knative.dev/client-pkg/pkg/wait"
"knative.dev/client/pkg/flags"
servingclientlib "knative.dev/client/pkg/serving"
clientservingv1 "knative.dev/client/pkg/serving/v1"
"knative.dev/client/pkg/wait"
"knative.dev/serving/pkg/apis/autoscaling"
v1 "knative.dev/serving/pkg/apis/serving/v1"

Expand Down
2 changes: 1 addition & 1 deletion pkg/knative/describer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"k8s.io/apimachinery/pkg/api/errors"
clientservingv1 "knative.dev/client-pkg/pkg/serving/v1"
clientservingv1 "knative.dev/client/pkg/serving/v1"
eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1"

fn "knative.dev/func/pkg/functions"
Expand Down
2 changes: 1 addition & 1 deletion pkg/knative/lister.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

corev1 "k8s.io/api/core/v1"
clientservingv1 "knative.dev/client-pkg/pkg/serving/v1"
clientservingv1 "knative.dev/client/pkg/serving/v1"
"knative.dev/pkg/apis"

fn "knative.dev/func/pkg/functions"
Expand Down
2 changes: 1 addition & 1 deletion plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"syscall"

"knative.dev/client-pkg/pkg/plugin"
"knative.dev/client/pkg/plugin"

"knative.dev/func/cmd"
)
Expand Down

0 comments on commit a13056e

Please sign in to comment.