You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have done some more investigation related to this PR: #1595, and I found more related issues / inconsistencies.
For instance in doctl databases topics update:
--cleanup-policy string Specifies the retention policy to use on log segments: Possible values are 'delete', 'compact_delete', 'compact' (default "delete")
--compression-type string Specifies the compression type for a kafka topic: Possible values are 'producer', 'gzip', 'snappy', 'Iz4', 'zstd', 'uncompressed' (default "producer")
but in doctl databases create and most other places:
--engine pg The database's engine. Possible values are: pg, `mysql`, `redis`, `mongodb`, `kafka` and `opensearch`. (default "pg")
In the first example, apostrophes don't interfere with command argument type generation and it stays defined as string.
In the second example, backticks are causing to use first value (pg) as data type for argument, which can be confusing.
I would be happy to create PR to fix this, however, I am not sure whether there's any reason attached to using backticks versus apostrophes. I am also not sure why default value is in quotes.
One possible solution is to introduce enum data type, and then argument descriptions could look like this:
--engine enum The database's engine. Possible enum values are: `pg`, `mysql`, `redis`, `mongodb`, `kafka` and `opensearch`. (default "pg")
The text was updated successfully, but these errors were encountered:
I am also not sure why default value is in quotes.
This behavior comes from the Cobra library. For example, notice we specify a default but don't actually add that to the description. Cobra automatically appends the (default "pg"):
Describe the Issue:
I have done some more investigation related to this PR: #1595, and I found more related issues / inconsistencies.
For instance in doctl databases topics update:
but in doctl databases create and most other places:
In the first example, apostrophes don't interfere with command argument type generation and it stays defined as string.
In the second example, backticks are causing to use first value (pg) as data type for argument, which can be confusing.
I would be happy to create PR to fix this, however, I am not sure whether there's any reason attached to using backticks versus apostrophes. I am also not sure why default value is in quotes.
One possible solution is to introduce enum data type, and then argument descriptions could look like this:
The text was updated successfully, but these errors were encountered: