Git Product home page Git Product logo

d-simpleconfig's People

Contributors

mihails-strasuns avatar o3o avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

laeeth

d-simpleconfig's Issues

Support '--key=value' in CLI parsing

Currently readConfiguration fails if provided with a '--key=value' CLI option.

Example:

import simpleconfig;    
    
struct Config {    
    @cli("test|t")    
    string test;    
}    
    
void main(string[] args)    
{    
    Config c;    
    readConfiguration(c);    
    writeln(c.test);    
}
[0] fra /t/prova> ./prova -t ciao
ciao
[0] fra /t/prova> ./prova -t=ciao
core.exception.RangeError@/home/fra/.dub/packages/simpleconfig-0.2.1/simpleconfig/source/simpleconfig/args.d(68): Range violation
----------------
??:? _d_arrayboundsp [0x7fa6c05f4fb1]
/home/fra/.dub/packages/simpleconfig-0.2.1/simpleconfig/source/simpleconfig/args.d:68 pure @safe immutable(char)[][] simpleconfig.args.readConfigurationImpl!(app.Config).readConfigurationImpl(ref app.Config, immutable(char)[][]) [0x560eb1cfa6e7]
/home/fra/.dub/packages/simpleconfig-0.2.1/simpleconfig/source/simpleconfig/args.d:11 immutable(char)[][] simpleconfig.args.readConfiguration!(app.Config).readConfiguration(ref app.Config) [0x560eb1cfa4d7]
/home/fra/.dub/packages/simpleconfig-0.2.1/simpleconfig/source/simpleconfig/package.d:36 immutable(char)[][] simpleconfig.readConfiguration!(app.Config).readConfiguration(ref app.Config) [0x560eb1cf31d9]
/tmp/prova/source/app.d:13 _Dmain [0x560eb1ce5664]
[0] fra /t/prova(1)> ./prova --test=ciao

[0] fra /t/prova> ./prova --test ciao
ciao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.