Skip to content

Commit

Permalink
Check if flag is set
Browse files Browse the repository at this point in the history
  • Loading branch information
llDrLove committed Jun 13, 2024
1 parent 342abd4 commit e9ff4fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions commands/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -1671,11 +1671,11 @@ func buildClusterCreateRequestFromArgs(c *CmdConfig, r *godo.KubernetesClusterCr
}
}

controlPlanePermissionAllowedAddresses, err := c.Doit.GetStringSlice(c.NS, doctl.ArgControlPlanePermissionAllowedAddresses)
controlPlanePermissionAllowedAddresses, isSet, err := c.Doit.GetStringSliceIsFlagSet(c.NS, doctl.ArgControlPlanePermissionAllowedAddresses)
if err != nil {
return err
}
if len(controlPlanePermissionAllowedAddresses) > 0 {
if isSet {
if r.ControlPlanePermission == nil {
r.ControlPlanePermission = &godo.KubernetesControlPlanePermission{}
}
Expand Down Expand Up @@ -1786,11 +1786,11 @@ func buildClusterUpdateRequestFromArgs(c *CmdConfig, r *godo.KubernetesClusterUp
}
}

controlPlanePermissionAllowedAddresses, err := c.Doit.GetStringSlice(c.NS, doctl.ArgControlPlanePermissionAllowedAddresses)
controlPlanePermissionAllowedAddresses, isSet, err := c.Doit.GetStringSliceIsFlagSet(c.NS, doctl.ArgControlPlanePermissionAllowedAddresses)
if err != nil {
return err
}
if len(controlPlanePermissionAllowedAddresses) > 0 {
if isSet {
if r.ControlPlanePermission == nil {
r.ControlPlanePermission = &godo.KubernetesControlPlanePermission{}
}
Expand Down

0 comments on commit e9ff4fc

Please sign in to comment.