What's the proper way to use std.getopt?

Jordi Gutiérrez Hermoso jordigh at octave.org
Tue Dec 12 23:06:59 UTC 2017


On Tuesday, 12 December 2017 at 20:57:28 UTC, Jon Degenhardt 
wrote:
> On Monday, 11 December 2017 at 20:58:25 UTC, Jordi Gutiérrez 
> Hermoso wrote:
>> What's the proper style, then? Can someone show me a good 
>> example of how to use getopt and the docstring it 
>> automatically generates?
[snip]
> See:
>  
> https://github.com/eBay/tsv-utils-dlang/blob/master/tsv-sample/src/tsv-sample.d

Oh, thanks! This is more or less what I wanted.

I suppose showing all of the docstring when the arguments are bad 
is possibly stupid and I shouldn't be doing that to begin with. 
I'll adopt this style to only show which argument was bad.


More information about the Digitalmars-d-learn mailing list