commands

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UpdateOptRebuild = iota
	UpdateOptAdd
	UpdateOptRemove
	UpdateOptUpdate
)
View Source
const (
	VersionTpl = `{{with .Name}}{{printf "%s " .}}{{end}}{{printf "cli version %s" .Version}}
`
)

Variables

View Source
var CreateCmd = &cobra.Command{
	Use:              "create [flags] [appName]",
	Short:            "create a flogo application project",
	Long:             `Creates a flogo application project.`,
	Args:             cobra.RangeArgs(0, 1),
	PersistentPreRun: func(cmd *cobra.Command, args []string) {},
	Run: func(cmd *cobra.Command, args []string) {

		api.SetVerbose(verbose)
		appName := ""
		if len(args) > 0 {
			appName = args[0]
		}

		currentDir, err := os.Getwd()
		if err != nil {
			fmt.Fprintf(os.Stderr, "Error determining working directory: %v\n", err)
			os.Exit(1)
		}
		_, err = api.CreateProject(currentDir, appName, flogoJsonPath, coreVersion)
		if err != nil {
			fmt.Fprintf(os.Stderr, "Error creating project: %v\n", err)
			os.Exit(1)
		}
	},
}

Functions

func Execute

func Execute()

func Initialize

func Initialize(version string)

func UpdateCLI

func UpdateCLI(pluginPkg string, updateOption int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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