Files
filebrowser/cmd/config_cat.go
T

32 lines
623 B
Go
Raw Normal View History

2019-01-05 22:44:33 +00:00
package cmd
import (
"github.com/spf13/cobra"
)
func init() {
configCmd.AddCommand(configCatCmd)
}
var configCatCmd = &cobra.Command{
Use: "cat",
Short: "Prints the configuration",
Long: `Prints the configuration.`,
Args: cobra.NoArgs,
RunE: python(func(_ *cobra.Command, _ []string, d *pythonData) error {
2019-01-08 14:07:55 +00:00
set, err := d.store.Settings.Get()
if err != nil {
return err
}
2019-01-08 14:07:55 +00:00
ser, err := d.store.Settings.GetServer()
if err != nil {
return err
}
2019-01-08 14:07:55 +00:00
auther, err := d.store.Auth.Get(set.AuthMethod)
if err != nil {
return err
}
return printSettings(ser, set, auther)
2019-01-07 20:24:23 +00:00
}, pythonConfig{}),
2019-01-05 22:44:33 +00:00
}