args4c

package args4c

Visibility
  1. Public
  2. All

Type Members

  1. trait ConfigImplicits extends AnyRef

Value Members

  1. object Args4c

    can convert command-line arguments (a Seq[String]) into an Either[String, Config] representing either a successfully merged configuration (Right(config)) or an error.

    can convert command-line arguments (a Seq[String]) into an Either[String, Config] representing either a successfully merged configuration (Right(config)) or an error.

    The user arguments can be:

    • the relative path to a config file
    • the absolute path to a config file
    • the path to a config file on the classpath
    • a key/value pair to a configuration value in the form:
      • <key> = <value>
      • <key>=<value>
      • -<key> = <value>
      • -<key>=<value>

    The values are resolved left-to right, with any key/value settings taking precidence over any file settings.

    MyApp foo=bar myConf.conf x.y.z=1,2,3 anotherConf.properties

    would use the configuration value 'bar' for property 'foo' and "1,2,3" for property x.y.z over any properties in myConf.conf or anotherConf.properties.

    Then any values in myConf.conf would have its configuration settings take precidence over anotherConf.properties

  2. object ConfigApp

    Extends the ArgsAsConfigParser to also offer the usual suspects - 'help' and '-show=<path/to/config>'

  3. object ConfigImplicits extends ConfigImplicits

  4. object Example

  5. package io

Ungrouped