File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
cmd/clusterawsadm/cmd/eks/addons Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import (
2525 "github.com/aws/aws-sdk-go-v2/service/eks"
2626 "github.com/aws/aws-sdk-go/aws"
2727 "github.com/spf13/cobra"
28+ "k8s.io/utils/ptr"
2829
2930 cmdout "sigs.k8s.io/cluster-api-provider-aws/v2/cmd/clusterawsadm/printers"
3031)
@@ -52,13 +53,10 @@ func listInstalledCmd() *cobra.Command {
5253}
5354
5455func listInstalledAddons (region , clusterName , printerType * string ) error {
55- var regionOptsFunc config.LoadOptionsFunc
5656 ctx := context .TODO ()
57- if * region != "" {
58- regionOptsFunc = config .WithRegion (* region )
59- }
57+
6058 optFns := []func (* config.LoadOptions ) error {
61- regionOptsFunc ,
59+ config . WithRegion ( ptr . Deref ( region , "" )) ,
6260 }
6361
6462 cfg , err := config .LoadDefaultConfig (context .Background (), optFns ... )
You can’t perform that action at this time.
0 commit comments