Copyright | (c) 2019 Lucas David Traverso |
---|---|
License | MPL-2.0 |
Maintainer | Lucas David Traverso <lucas6246@gmail.com> |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Command line arguments based source
Synopsis
- data CLIArgsSource = CLIArgsSource {}
- type RawCLIArgs = [String]
- fromConfig :: SourceCreator
- fromEnv :: IO Source
- fromArgs :: RawCLIArgs -> Source
- parseArgsIntoKeyValue :: [String] -> [(Key, Text)]
Documentation
data CLIArgsSource Source #
This source provides keys from the command line arguments passed into
the program. It only accepts arguments with --
and an equals, for
example: ./awesomeapp --warp.port=5000
Instances
Show CLIArgsSource Source # | |
Defined in Conferer.Source.CLIArgs showsPrec :: Int -> CLIArgsSource -> ShowS # show :: CLIArgsSource -> String # showList :: [CLIArgsSource] -> ShowS # | |
IsSource CLIArgsSource Source # | |
Defined in Conferer.Source.CLIArgs getKeyInSource :: CLIArgsSource -> Key -> IO (Maybe Text) Source # getSubkeysInSource :: CLIArgsSource -> Key -> IO [Key] Source # |
type RawCLIArgs = [String] Source #
Type alias for cli args
fromConfig :: SourceCreator Source #
Create a SourceCreator
using fromEnv