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,
|
2019-01-07 20:24:23 +00:00
|
|
|
Run: python(func(cmd *cobra.Command, args []string, d pythonData) {
|
|
|
|
s, err := d.store.Settings.Get()
|
2019-01-05 22:44:33 +00:00
|
|
|
checkErr(err)
|
2019-01-07 20:24:23 +00:00
|
|
|
auther, err := d.store.Auth.Get(s.AuthMethod)
|
2019-01-05 22:44:33 +00:00
|
|
|
checkErr(err)
|
|
|
|
printSettings(s, auther)
|
2019-01-07 20:24:23 +00:00
|
|
|
}, pythonConfig{}),
|
2019-01-05 22:44:33 +00:00
|
|
|
}
|