filebrowser/cmd/config_cat.go
Henrique Dias 01ff03e426
feat: wrap commands to send info (#612)
Wrap commands in a better way to pass storage
2019-01-07 20:24:23 +00:00

24 lines
483 B
Go

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,
Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
s, err := d.store.Settings.Get()
checkErr(err)
auther, err := d.store.Auth.Get(s.AuthMethod)
checkErr(err)
printSettings(s, auther)
}, pythonConfig{}),
}