2022-04-22 17:38:40 +02:00
|
|
|
package config
|
|
|
|
|
|
|
|
// Report returns global config values as a table for reporting.
|
|
|
|
func (f CliFlags) Report() (rows [][]string, cols []string) {
|
2022-07-05 23:13:34 +02:00
|
|
|
cols = []string{"Environment", "CLI Flag", "Default", "Description"}
|
2022-04-22 17:38:40 +02:00
|
|
|
|
|
|
|
rows = make([][]string, 0, len(f))
|
|
|
|
|
|
|
|
for _, flag := range Flags {
|
|
|
|
if flag.Hidden() {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
2022-07-05 23:13:34 +02:00
|
|
|
rows = append(rows, []string{flag.EnvVar(), flag.CommandFlag(), flag.Default(), flag.Usage()})
|
2022-04-22 17:38:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return rows, cols
|
|
|
|
}
|