cmd

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ListAddOnsCmd = &cobra.Command{
	Use:   "addons",
	Short: "Lists installed ESO AddOns",
	Long: `Lists AddOns installed in the ESO AddOns directory.

By default, this will print out a simple list with only one AddOn per line. However, other formats may be specified via the flags.
`,

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

		if len(errs) > 0 {
			for _, e := range errs {
				fmt.Println(e)
			}
			os.Exit(1)
		}

		switch {
		case flags.json:
			fmt.Println(addons.Print("json"))
		case flags.markdown:
			fmt.Println(addons.Print("markdown"))
		case flags.raw:
			fmt.Println(addons.Print("header"))
		default:
			fmt.Println(addons.Print("simple"))
		}
	},
}

ListAddOnsCmd represents the addons command

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