mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-16 19:00:05 +07:00
feat: support export config outline and config marshal (#27)
This commit is contained in:
31
cmd/export.go
Normal file
31
cmd/export.go
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
* Copyright (c) 2022-2023, v2rayA Organization <team@v2raya.org>
|
||||
*/
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/v2rayA/dae/config"
|
||||
)
|
||||
|
||||
var (
|
||||
exportCmd = &cobra.Command{
|
||||
Use: "export",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
_ = cmd.Help()
|
||||
},
|
||||
}
|
||||
exportOutlineCmd = &cobra.Command{
|
||||
Use: "outline",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println(config.ExportOutlineJson(Version))
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
exportCmd.AddCommand(exportOutlineCmd)
|
||||
}
|
Reference in New Issue
Block a user