mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
27 lines
493 B
Go
27 lines
493 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: func(cmd *cobra.Command, args []string) {
|
|
db := getDB()
|
|
defer db.Close()
|
|
st := getStorage(db)
|
|
s, err := st.Settings.Get()
|
|
checkErr(err)
|
|
auther, err := st.Auth.Get(s.AuthMethod)
|
|
checkErr(err)
|
|
printSettings(s, auther)
|
|
},
|
|
}
|