(create opts)
Creates a configuration map from options. Example:
(config/create {:my-env {:env "PWD"}
:my-prop {:prop "java.vm.version"}
:both {:env "PWD"
:prop "java.version"}})
;; => {:my-env "/my/path"
;; :my-prop "12.1"
;; :both "12.1"}
Config parameters
:env
- Get value from a:prop
- Get value from a java system property:default
- Default value if no value is provided:parse-fn
- Funtion to parse the raw value.Notes:
:prop
takes priority over :env
if both are provided.:parse-fn
is applied to both :env
and :prop
values.Creates a configuration map from options. Example: ```clojure (config/create {:my-env {:env "PWD"} :my-prop {:prop "java.vm.version"} :both {:env "PWD" :prop "java.version"}}) ;; => {:my-env "/my/path" ;; :my-prop "12.1" ;; :both "12.1"} ``` Config parameters - `:env` - Get value from a - `:prop` - Get value from a java system property - `:default` - Default value if no value is provided - `:parse-fn` - Funtion to parse the raw value. Notes: - `:prop` takes priority over `:env` if both are provided. - `:parse-fn` is applied to both `:env` and `:prop` values.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close