cmd

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: BSD-3-Clause Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const BACKUP_FOLDER string = "./backup/"
View Source
const MAX_RETRY int = 3

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "manipulator",
	Short: "Manipulatpr is a CLI tool to help manage GwentAPI",
	Long: `Manipulator is a CLI tool to help manage GwentAPI

This application is a tool to quickly perform maintenance operation on GwentAPI database and application.`,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		if len(filePath) == 0 {
			return errors.New("Input file not provided")
		}
		if _, err := os.Stat(filePath); err != nil {
			return fmt.Errorf("Invalid file path: %s", filePath)
		}
		return nil
	},
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type DataContainer

type DataContainer struct {
	Cards      map[string]models.GwentCard
	Groups     map[string]struct{}
	Rarities   map[string]struct{}
	Factions   map[string]struct{}
	Categories map[string]struct{}
}

Jump to

Keyboard shortcuts

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