cmdfmt

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InfoCmd = &cobra.Command{

	Use: "info",

	Aliases: []string{
		"status",
	},

	Short: "get formatter info",

	Long: infoLong,

	Run: func(cmd *cobra.Command, args []string) {

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		var formatter string

		if 0 < len(args) {

			formatter = args[0]

		}

		err = InfoRun(formatter)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}
View Source
var PullCmd = &cobra.Command{

	Use: "pull",

	Short: "docker pull a formatter",

	Long: pullLong,

	Run: func(cmd *cobra.Command, args []string) {

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		var formatter string

		if 0 < len(args) {

			formatter = args[0]

		}

		err = PullRun(formatter)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}
View Source
var StartCmd = &cobra.Command{

	Use: "start",

	Short: "start a formatter",

	Long: startLong,

	Run: func(cmd *cobra.Command, args []string) {

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		var formatter string

		if 0 < len(args) {

			formatter = args[0]

		}

		err = StartRun(formatter)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}
View Source
var StopCmd = &cobra.Command{

	Use: "stop",

	Short: "stop a formatter",

	Long: stopLong,

	Run: func(cmd *cobra.Command, args []string) {

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		var formatter string

		if 0 < len(args) {

			formatter = args[0]

		}

		err = StopRun(formatter)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}
View Source
var TestCmd = &cobra.Command{

	Use: "test",

	Short: "test that formatter(s) are working",

	Long: testLong,

	Run: func(cmd *cobra.Command, args []string) {

		ga.SendCommandPath(cmd.CommandPath())

		var err error

		var formatter string

		if 0 < len(args) {

			formatter = args[0]

		}

		err = TestRun(formatter)
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
	},
}

Functions

func InfoRun

func InfoRun(formatter string) (err error)

func PullRun

func PullRun(formatter string) (err error)

func StartRun

func StartRun(formatter string) (err error)

func StopRun

func StopRun(formatter string) (err error)

func TestRun added in v0.6.8

func TestRun(formatter string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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