Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrique Santos committed Nov 23, 2023
1 parent dc9b949 commit 865fca3
Show file tree
Hide file tree
Showing 29 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/dns/record-set/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/dns/record-set/delete/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/dns/record-set/describe/describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/dns/record-set/list/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/dns/record-set/update/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/dns/zone/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/dns/zone/delete/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/dns/zone/describe/describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/dns/zone/list/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/dns/zone/update/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/postgresql/credential/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/postgresql/credential/delete/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/postgresql/credential/list/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/postgresql/instance/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/postgresql/instance/delete/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/postgresql/instance/describe/describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/postgresql/instance/list/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestParseFlags(t *testing.T) {
for _, tt := range tests {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/postgresql/instance/update/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/postgresql/offering/list/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestParseFlags(t *testing.T) {
for _, tt := range tests {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func NewRootCmd() *cobra.Command {
SilenceUsage: true,
DisableAutoGenTag: true,
}
err := globalflags.ConfigureFlags(cmd.PersistentFlags())
err := globalflags.Configure(cmd.PersistentFlags())
cobra.CheckErr(err)
addSubcommands(cmd)
return cmd
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/ske/cluster/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
ConfigureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/ske/cluster/delete/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/ske/cluster/describe/describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestParseFlags(t *testing.T) {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
configureFlags(cmd)
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/ske/cluster/list/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestParseFlags(t *testing.T) {
for _, tt := range tests {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/ske/describe/describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestParseFlags(t *testing.T) {
for _, tt := range tests {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/ske/disable/disable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestParseFlags(t *testing.T) {
for _, tt := range tests {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/ske/enable/enable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestParseFlags(t *testing.T) {
for _, tt := range tests {
t.Run(tt.description, func(t *testing.T) {
cmd := &cobra.Command{}
err := globalflags.ConfigureFlags(cmd.Flags())
err := globalflags.Configure(cmd.Flags())
if err != nil {
t.Fatalf("configure global flags: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/globalflags/global_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (f GlobalFlag) FlagName() string {
return string(f)
}

func ConfigureFlags(flagSet *pflag.FlagSet) error {
func Configure(flagSet *pflag.FlagSet) error {
flagSet.Var(flags.UUIDFlag(), ProjectIdFlag.FlagName(), "Project ID")
err := viper.BindPFlag(config.ProjectIdKey, flagSet.Lookup(ProjectIdFlag.FlagName()))
if err != nil {
Expand Down

0 comments on commit 865fca3

Please sign in to comment.