Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bump Go dependencies #117

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cmd/kubectl-accurate/sub/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
)

// NewCmd creates the root *cobra.Command of `kubectl-accurate`.
func NewCmd(streams genericclioptions.IOStreams) *cobra.Command {
func NewCmd(streams genericiooptions.IOStreams) *cobra.Command {
cmd := &cobra.Command{
Use: "accurate",
Short: "Subcommand for Accurate",
Expand Down Expand Up @@ -41,7 +42,7 @@ func Execute() {
flags := pflag.NewFlagSet("kubectl-accurate", pflag.ExitOnError)
pflag.CommandLine = flags

cmd := NewCmd(genericclioptions.IOStreams{
cmd := NewCmd(genericiooptions.IOStreams{
In: os.Stdin,
Out: os.Stdout,
ErrOut: os.Stderr,
Expand Down
7 changes: 4 additions & 3 deletions cmd/kubectl-accurate/sub/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ import (
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

const indent = 4

type listOptions struct {
streams genericclioptions.IOStreams
streams genericiooptions.IOStreams
client client.Client
root string
}

func newListCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newListCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
opts := &listOptions{}

cmd := &cobra.Command{
Expand All @@ -40,7 +41,7 @@ If ROOT is given, only the tree under the ROOT namespace will be shown.`,
return cmd
}

func (o *listOptions) Fill(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
func (o *listOptions) Fill(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
o.streams = streams
cl, err := makeClient(config)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion cmd/kubectl-accurate/sub/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package sub
import (
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
)

func newNamespaceCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newNamespaceCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
cmd := &cobra.Command{
Use: "namespace",
Aliases: []string{"ns"},
Expand Down
7 changes: 4 additions & 3 deletions cmd/kubectl-accurate/sub/namespace_describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

type nsDescribeOpts struct {
streams genericclioptions.IOStreams
streams genericiooptions.IOStreams
client client.Client
name string
accurateNS string
}

func newNSDescribeCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newNSDescribeCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
opts := &nsDescribeOpts{}
cmd := &cobra.Command{
Use: "describe NS",
Expand All @@ -45,7 +46,7 @@ func newNSDescribeCmd(streams genericclioptions.IOStreams, config *genericcliopt
return cmd
}

func (o *nsDescribeOpts) Fill(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
func (o *nsDescribeOpts) Fill(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
o.streams = streams
cl, err := makeClient(config)
if err != nil {
Expand Down
7 changes: 4 additions & 3 deletions cmd/kubectl-accurate/sub/namespace_settype.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ import (
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

type nsSetTypeOpts struct {
streams genericclioptions.IOStreams
streams genericiooptions.IOStreams
client client.Client
name string
typ string
}

func newNSSetTypeCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newNSSetTypeCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
opts := &nsSetTypeOpts{}

cmd := &cobra.Command{
Expand All @@ -40,7 +41,7 @@ To unset the type, specify "none" as TYPE.`,
return cmd
}

func (o *nsSetTypeOpts) Fill(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
func (o *nsSetTypeOpts) Fill(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
o.streams = streams
cl, err := makeClient(config)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion cmd/kubectl-accurate/sub/sub.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package sub
import (
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
)

func newSubCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newSubCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
cmd := &cobra.Command{
Use: "sub",
Short: "sub-namespace command",
Expand Down
7 changes: 4 additions & 3 deletions cmd/kubectl-accurate/sub/sub_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@ import (
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

type subCreateOpts struct {
streams genericclioptions.IOStreams
streams genericiooptions.IOStreams
client client.Client
name string
parent string
labels map[string]string
annotations map[string]string
}

func newSubCreateCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newSubCreateCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
opts := &subCreateOpts{}

cmd := &cobra.Command{
Expand All @@ -43,7 +44,7 @@ This effectively creates a namespace named NAME as a sub-namespace of NS.`,
return cmd
}

func (o *subCreateOpts) Fill(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
func (o *subCreateOpts) Fill(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
o.streams = streams
cl, err := makeClient(config)
if err != nil {
Expand Down
7 changes: 4 additions & 3 deletions cmd/kubectl-accurate/sub/sub_cut.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ import (
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

type subCutOpts struct {
streams genericclioptions.IOStreams
streams genericiooptions.IOStreams
client client.Client
name string
}

func newSubCutCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newSubCutCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
opts := &subCutOpts{}

cmd := &cobra.Command{
Expand All @@ -39,7 +40,7 @@ The child sub-namespaces under NS will be moved along with it.`,
return cmd
}

func (o *subCutOpts) Fill(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
func (o *subCutOpts) Fill(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
o.streams = streams
cl, err := makeClient(config)
if err != nil {
Expand Down
7 changes: 4 additions & 3 deletions cmd/kubectl-accurate/sub/sub_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ import (
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

type subDeleteOpts struct {
streams genericclioptions.IOStreams
streams genericiooptions.IOStreams
client client.Client
name string
}

func newSubDeleteCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newSubDeleteCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
opts := &subDeleteOpts{}

cmd := &cobra.Command{
Expand All @@ -38,7 +39,7 @@ This effectively deletes the namespace NAME.`,
return cmd
}

func (o *subDeleteOpts) Fill(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
func (o *subDeleteOpts) Fill(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
o.streams = streams
cl, err := makeClient(config)
if err != nil {
Expand Down
7 changes: 4 additions & 3 deletions cmd/kubectl-accurate/sub/sub_graft.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ import (
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

type subGraftOpts struct {
streams genericclioptions.IOStreams
streams genericiooptions.IOStreams
client client.Client
name string
parent string
}

func newSubGraftCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newSubGraftCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
opts := &subGraftOpts{}

cmd := &cobra.Command{
Expand All @@ -45,7 +46,7 @@ A SubNamespace resource will be created in the PARENT namespace.`,
return cmd
}

func (o *subGraftOpts) Fill(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
func (o *subGraftOpts) Fill(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
o.streams = streams
cl, err := makeClient(config)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion cmd/kubectl-accurate/sub/sub_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package sub
import (
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
)

// newSubListCmd is an alias for the "kubectl-accurate list" command.
func newSubListCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newSubListCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
return newListCmd(streams, config)
}
7 changes: 4 additions & 3 deletions cmd/kubectl-accurate/sub/sub_move.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ import (
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

type subMoveOpts struct {
streams genericclioptions.IOStreams
streams genericiooptions.IOStreams
client client.Client
name string
parent string
orphan bool
}

func newSubMoveCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newSubMoveCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
opts := &subMoveOpts{}

cmd := &cobra.Command{
Expand Down Expand Up @@ -49,7 +50,7 @@ In this case, the original SubNamespace will be marked as conflicted.`,
return cmd
}

func (o *subMoveOpts) Fill(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
func (o *subMoveOpts) Fill(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
o.streams = streams
cl, err := makeClient(config)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion cmd/kubectl-accurate/sub/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package sub
import (
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
)

func newTemplateCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newTemplateCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
cmd := &cobra.Command{
Use: "template",
Short: "template subcommand",
Expand Down
7 changes: 4 additions & 3 deletions cmd/kubectl-accurate/sub/template_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ import (
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

type templateListOpts struct {
streams genericclioptions.IOStreams
streams genericiooptions.IOStreams
client client.Client
template string
}

func newTemplateListCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newTemplateListCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
opts := &templateListOpts{}

cmd := &cobra.Command{
Expand All @@ -38,7 +39,7 @@ If TEMPLATE is given, only the tree under the TEMPLATE namespace will be shown.`
return cmd
}

func (o *templateListOpts) Fill(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
func (o *templateListOpts) Fill(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
o.streams = streams
cl, err := makeClient(config)
if err != nil {
Expand Down
7 changes: 4 additions & 3 deletions cmd/kubectl-accurate/sub/template_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ import (
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

type templateSetOpts struct {
streams genericclioptions.IOStreams
streams genericiooptions.IOStreams
client client.Client
name string
template string
}

func newTemplateSetCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newTemplateSetCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
opts := &templateSetOpts{}

cmd := &cobra.Command{
Expand All @@ -39,7 +40,7 @@ NS must be a root or an independent namespace.`,
return cmd
}

func (o *templateSetOpts) Fill(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
func (o *templateSetOpts) Fill(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
o.streams = streams
cl, err := makeClient(config)
if err != nil {
Expand Down
7 changes: 4 additions & 3 deletions cmd/kubectl-accurate/sub/template_unset.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ import (
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/genericiooptions"
"sigs.k8s.io/controller-runtime/pkg/client"
)

type templateUnsetCmd struct {
streams genericclioptions.IOStreams
streams genericiooptions.IOStreams
client client.Client
name string
}

func newTemplateUnsetCmd(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
func newTemplateUnsetCmd(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags) *cobra.Command {
opts := &templateUnsetCmd{}

cmd := &cobra.Command{
Expand All @@ -36,7 +37,7 @@ func newTemplateUnsetCmd(streams genericclioptions.IOStreams, config *genericcli
return cmd
}

func (o *templateUnsetCmd) Fill(streams genericclioptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
func (o *templateUnsetCmd) Fill(streams genericiooptions.IOStreams, config *genericclioptions.ConfigFlags, args []string) error {
o.streams = streams
cl, err := makeClient(config)
if err != nil {
Expand Down
Loading
Loading