Coder Social home page Coder Social logo

gonf's People

Contributors

cdelorme avatar

Watchers

 avatar

gonf's Issues

deal with duplicate registration

Currently the onus is on the developer using this package to spot duplicate key names, environment variables, or command line options.

Given the simplicity of implementation, it would feel silly to make this the responsibility of the package.

Additionally, for this to make sense, the package would need to return errors instead of silently ignoring developer mistakes.

I do not plan to "fix" this currently, but if someone bumps this ticket to open a discussion I would be happy to listen and negotiate.

add support for configuration file path overrides

The current solution only supports file name overrides, and defaults to application-relative or user-space paths by operating system.

It should be fairly trivial to adjust the processing logic to check for a / prefix and avoid mixing with the package global paths.

I may wait until someone bumps this ticket before making the change, since I have not yet encountered a scenario where I wrote a service application that could not leverage userspace or relative paths, which is a very traditional linux/unix requirement.

switch to black-box testing

This is certainly on the agenda. My current tests hit all manner of private functions.

The problem is not that the package has complex code, but that it supports a number of very complex implementations.

To write tests representing all of these implementations against the externally exposed Load() operation is challenging and will take some time.

Here is an incomplete summary of what needs to be validated:

  • support for all combinations of long and short flags, including bad data
  • casting of command line and environment variables to the supported types
    • string
    • bool
    • number
  • verifying structures and arrays from configuration files
  • verifying each layer overrides on a single property name
  • verifying how parent and child properties are handled
  • verifying how two child properties of the same name are handled
  • verifying how json tags conflicting with public property names are handled
  • verifying the application of deep properties, with the same casting support

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.