Files
artalkjs/cmd/config.go
T

26 lines
494 B
Go

package cmd
import (
"encoding/json"
"fmt"
"github.com/ArtalkJS/Artalk/internal/core"
"github.com/spf13/cobra"
)
func NewConfigCommand(app *core.App) *cobra.Command {
configCmd := &cobra.Command{
Use: "config",
Short: "Output Config Information",
Run: func(cmd *cobra.Command, args []string) {
buf, _ := json.MarshalIndent(app.Conf(), "", " ")
fmt.Println(string(buf))
},
Annotations: map[string]string{
BootModeKey: MODE_MINI_BOOT,
},
}
return configCmd
}