Documentation ¶
Overview ¶
Package cmd provides some common information to clair's binaries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version string
Version is a version string, injected at release time for release builds.
Functions ¶
func LoadConfig ¶ added in v4.7.0
LoadConfig loads the named config file or reports an error.
JSON and YAML formatted files are supported, as determined by the file extension ("json" or "yaml" -- "yml" is not supported). If a directory suffixed with ".d" exists (e.g. a file "config.json" and a directory "config.json.d"), then all files with the same extension or the same extension suffixed with "-patch" will be loaded in lexical order and merged with the main configuration or applied as an RFC6902 patch, respectively.
For example, given the paths:
config.yaml config.yaml.d/ config.yaml.d/secrets.yaml config.yaml.d/override.yaml-patch config.yaml.d/unloved.json-patch
"Config.yaml" will be the base config, "override.yaml-patch" will be applied as a patch to the base config, "secrets.yaml" will be merged into the base config, and "unloved.json-patch" will be ignored.
The "strict" argument controls whether the function returns on the first error, or runs the full routine and returns all accumulated errors at the end.
Types ¶
This section is empty.