Skip to content

Commit 791de8e

Browse files
committed
fix null params
1 parent 695fce0 commit 791de8e

10 files changed

Lines changed: 6 additions & 1 deletion

File tree

pkg/cluster/charts/etcd.tgz

-347 Bytes
Binary file not shown.

pkg/cluster/charts/kafka.tgz

0 Bytes
Binary file not shown.

pkg/cluster/charts/mongodb.tgz

12 Bytes
Binary file not shown.

pkg/cluster/charts/mysql.tgz

3 Bytes
Binary file not shown.

pkg/cluster/charts/postgresql.tgz

0 Bytes
Binary file not shown.

pkg/cluster/charts/qdrant.tgz

1 Byte
Binary file not shown.

pkg/cluster/charts/rabbitmq.tgz

4 Bytes
Binary file not shown.

pkg/cluster/charts/redis.tgz

2 Bytes
Binary file not shown.

pkg/cmd/cluster/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func clusterPreDeleteHook(o *action.DeleteOptions, object runtime.Object) error
9292
}
9393

9494
if o.Force {
95-
fmt.Fprintf(o.Out, printer.BoldRed("WARNING: Using --force may lead to potential data loss or residual dirty data if the cluster depends on other clusters.\n"))
95+
fmt.Fprint(o.Out, printer.BoldRed("WARNING: Using --force may lead to potential data loss or residual dirty data if the cluster depends on other clusters.\n"))
9696
components := util.GetComponentsOrShards(cluster)
9797
for _, componentName := range components {
9898
dynamicClient, err := o.Factory.DynamicClient()

pkg/util/flags/flags.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const (
5050
)
5151

5252
const (
53+
typeNull = "null"
5354
typeString = "string"
5455
typeNumber = "number"
5556
typeInteger = "integer"
@@ -135,6 +136,8 @@ func buildOneFlag(cmd *cobra.Command, k string, s *spec.Schema, isArray bool) er
135136
}
136137
case typeArray:
137138
return fmt.Errorf("unsupported build flags for object with array nested within an array")
139+
case typeNull:
140+
return nil
138141
default:
139142
return fmt.Errorf("unsupported json schema type %s", s.Type)
140143
}
@@ -160,6 +163,8 @@ func buildOneFlag(cmd *cobra.Command, k string, s *spec.Schema, isArray bool) er
160163
if err := buildOneFlag(cmd, name, s.Items.Schema, true); err != nil {
161164
return err
162165
}
166+
case typeNull:
167+
return nil
163168
default:
164169
return fmt.Errorf("unsupported json schema type %s", s.Type)
165170
}

0 commit comments

Comments
 (0)