This commit is contained in:
eric
2025-08-28 13:06:53 +08:00
parent 620ba326a9
commit 1b98ac6e72
350 changed files with 154034 additions and 0 deletions

31
cmd/config_cat.go Normal file
View File

@@ -0,0 +1,31 @@
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 {
set, err := d.store.Settings.Get()
if err != nil {
return err
}
ser, err := d.store.Settings.GetServer()
if err != nil {
return err
}
auther, err := d.store.Auth.Get(set.AuthMethod)
if err != nil {
return err
}
return printSettings(ser, set, auther)
}, pythonConfig{}),
}