cmd

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitCmd = &cobra.Command{
	Use:   "init",
	Short: "init and check config",
	Long:  `auto create config file or check config, and auto add new key and delete old key`,
	RunE:  Init,
}
View Source
var RootCmd = &cobra.Command{
	Use:   "synctv-server",
	Short: "synctv-server",
	Long:  `synctv-server https://github.com/synctv-org/synctv`,
}
View Source
var ServerCmd = &cobra.Command{
	Use:               "server",
	Short:             "Start synctv-server",
	Long:              `Start synctv-server`,
	PersistentPreRunE: Init,
	PreRunE:           func(cmd *cobra.Command, args []string) error { return InitGinMode() },
	Run:               Server,
}
View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: "Print the version number of Sync TV Server",
	Long:  `All software has versions. This is Sync TV Server's`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Printf("Sync TV Server version %s\n", conf.Version)
		fmt.Printf("Sync TV Web version %s\n", conf.WebVersion)
		fmt.Printf("Git commit %s\n", conf.GitCommit)
		fmt.Printf("Go version %s\n", runtime.Version())
		fmt.Printf("Built with %s\n", runtime.Compiler)
		fmt.Printf("OS/Arch %s/%s\n", runtime.GOOS, runtime.GOARCH)
	},
}

Functions

func ConfCmd

func ConfCmd() *cobra.Command

func Execute

func Execute()

func Init

func Init(cmd *cobra.Command, args []string) error

func InitGinMode

func InitGinMode() error

func Server

func Server(cmd *cobra.Command, args []string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL