e739dd3e89
Enables developers to extend the existing config and API. Initial proof of concept and work in progress. Implementation details may change. Feedback welcome! Signed-off-by: Michael Mayer <michael@photoprism.app>
18 lines
441 B
Go
18 lines
441 B
Go
package config
|
|
|
|
// Report returns global config values as a table for reporting.
|
|
func (f CliFlags) Report() (rows [][]string, cols []string) {
|
|
cols = []string{"Environment", "CLI Flag", "Default", "Description"}
|
|
|
|
rows = make([][]string, 0, len(f))
|
|
|
|
for _, flag := range Flags {
|
|
if flag.Hidden() {
|
|
continue
|
|
}
|
|
|
|
rows = append(rows, []string{flag.EnvVar(), flag.CommandFlag(), flag.Default(), flag.Usage()})
|
|
}
|
|
|
|
return rows, cols
|
|
}
|