Configuration: All the non-global flags can alternatively be passed as configuration. The configuration file is a YAML file with entries matching the flag name. The name of a flag is the part after the '--' of the command line parameter. Every '_' character in the flag name means a nested property. For instance the '--tz CEST' and '--ssl-password secret' will be mapped to this YAML configuration: tz: CEST ssl: password: secret The configuration file will be searched in the following places and order: · /etc/uyuni/uyuni-tools.yaml · $XDG_CONFIG_HOME/{{ .Name }}/{{ .ConfigFile }} · $HOME/.config/{{ .Name }}/{{ .ConfigFile }} · $PWD/{{ .ConfigFile }} · the value of the --config flag Environment variables: All the non-global flags can also be passed as environment variables. The environment variable name is the flag name with '-' replaced by with '_' and the {{ .EnvPrefix }} prefix. For example the '--tz CEST' flag will be mapped to '{{ .EnvPrefix }}_TZ' and '--ssl-password' flags to '{{ .EnvPrefix }}_SSL_PASSWORD'
設定: 非グローバルフラグはすべて設定として渡すこともできます。 設定ファイルはフラグ名と一致するエントリを含むYAMLファイルです。 フラグの名前はコマンドラインパラメータの「--」以降の部分です。 フラグ名の「_」文字はすべて、ネストされたプロパティを意味します。 たとえば 「--tz CEST」と「--ssl-password secret」はこのYAML設定にマップされます。 tz: CEST ssl: パスワード: secret 設定ファイルは以下の場所と順序で検索されます: · $XDG_CONFIG_HOME/{{ .Name }}/{{ .ConfigFile }} · $HOME/.config/{{ .Name }}/{{ .ConfigFile }} · $PWD/{{ .ConfigFile }} · the value of the --config flag 環境変数: 非グローバルフラグはすべて、環境変数として渡すこともできます。 環境変数名は、フラグ名の「-」を「_」に置き換え、{{ .EnvPrefix }}プレフィックスを付けたものです。 たとえば、「--tz CEST」フラグは「{{ .EnvPrefix }}_TZ」にマップされ、 「--ssl-password」フラグは「{{ .EnvPrefix }}_SSL_PASSWORD」にマップされます。
Configuration:
All the non-global flags can alternatively be passed as configuration.
The configuration file is a YAML file with entries matching the flag name.
The name of a flag is the part after the '--' of the command line parameter.
Every '_' character in the flag name means a nested property.
For instance the '--tz CEST' and '--ssl-password secret' will be mapped to
this YAML configuration:
tz: CEST
ssl:
password: secret
The configuration file will be searched in the following places and order:
· /etc/uyuni/uyuni-tools.yaml
· $XDG_CONFIG_HOME/{{ .Name }}/{{ .ConfigFile }}
· $HOME/.config/{{ .Name }}/{{ .ConfigFile }}
· $PWD/{{ .ConfigFile }}
· the value of the --config flag
Environment variables:
All the non-global flags can also be passed as environment variables.
The environment variable name is the flag name with '-' replaced by with '_'
and the {{ .EnvPrefix }} prefix.
For example the '--tz CEST' flag will be mapped to '{{ .EnvPrefix }}_TZ'
and '--ssl-password' flags to '{{ .EnvPrefix }}_SSL_PASSWORD'
設定:
非グローバルフラグはすべて設定として渡すこともできます。
設定ファイルはフラグ名と一致するエントリを含むYAMLファイルです。
フラグの名前はコマンドラインパラメータの「--」以降の部分です。
フラグ名の「_」文字はすべて、ネストされたプロパティを意味します。
たとえば 「--tz CEST」と「--ssl-password secret」はこのYAML設定にマップされます。
tz: CEST
ssl:
パスワード: secret
設定ファイルは以下の場所と順序で検索されます:
· $XDG_CONFIG_HOME/{{ .Name }}/{{ .ConfigFile }}
· $HOME/.config/{{ .Name }}/{{ .ConfigFile }}
· $PWD/{{ .ConfigFile }}
· the value of the --config flag
環境変数:
非グローバルフラグはすべて、環境変数として渡すこともできます。
環境変数名は、フラグ名の「-」を「_」に置き換え、{{ .EnvPrefix }}プレフィックスを付けたものです。
たとえば、「--tz CEST」フラグは「{{ .EnvPrefix }}_TZ」にマップされ、
「--ssl-password」フラグは「{{ .EnvPrefix }}_SSL_PASSWORD」にマップされます。