Since the --domains
argument takes one domain, it should not be named in plural but singular, i.e. --domain
(which can then be specified multiple times).
I realize you don't want to just remove --domains
, but I suggest adding --domain
as the primary argument and the one listed in the help, and keep --domains
hidden, marking in deprecated wherever it's mentioned.
The other arguments are singular, luckily.
It's not uncommon in CLI apps for a flag to be repeated to form an array, type domains []string
for example, and it makes sense then for the name to be plural.
I'm currently grappling with this in the design of a program, and am trying to figure out whether a plural or singular form makes more sense. It probably depends if the values are together in a single value like "domain1.com,domain2.com,..." and separated by commas, or if they are listed individually.
Although I think I do like the singular form when the flag name is repeated each time.
Edit: Hi @rawtaz :wave: I have been seeing you all over the place lately :smile:
I agree, it's a matter of what value(s) the flag (argument) takes.
If the value for the flag is singular, the flag should be named singular (even if the flag itself can be repeated several times).
If the value for the flag can be multiple values, then it boils down to which is more prominent - is the intention or the most common case that one supply one value or multiple values?
Hi @mholt - Nice seeing you, I love the work you do :)
Hello,
i would like to "upvote" that --domains will accept multiple entries.
I do usemostly SAN Certs. With powershell i have to first determine how many hostnames the site got and then jump to a predefined command containing the right amount of "--domains" parameters. Such feature would make life much easier.
thanks
Most helpful comment
It's not uncommon in CLI apps for a flag to be repeated to form an array,
type domains []string
for example, and it makes sense then for the name to be plural.I'm currently grappling with this in the design of a program, and am trying to figure out whether a plural or singular form makes more sense. It probably depends if the values are together in a single value like "domain1.com,domain2.com,..." and separated by commas, or if they are listed individually.
Although I think I do like the singular form when the flag name is repeated each time.
Edit: Hi @rawtaz :wave: I have been seeing you all over the place lately :smile: