commands

package
v0.0.0-...-70b946c Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RootCmd = &cobra.Command{
		Use:   "root",
		Short: "Root Command",
		PersistentPreRun: func(cmd *cobra.Command, args []string) {
			logger = log.Sugar()
			logger.Info("Init finished")
		},
	}
)
View Source
var (
	// StartCmd the start command
	StartCmd = &cobra.Command{
		Use:   "start",
		Short: "Start Command",
		RunE: func(cmd *cobra.Command, args []string) (err error) {
			sched, err := initService()
			if err != nil {
				return err
			}
			return sched.Run()
		},
	}
)
View Source
var (
	// VersionCmd the version command
	VersionCmd = &cobra.Command{
		Use:   "version",
		Short: "Version Command",
		Run: func(cmd *cobra.Command, args []string) {
			logger.Info("Version: %s.%s.%s, CommitHash: %s\n", version.Maj, version.Min, version.Fix, version.GitCommit)
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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