commands

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RootConfigPflag   string
	RootIdentityPflag string
	RootContextPflag  string
	RootAccountPflag  string
	RootProjectPflag  string
)
View Source
var (
	Version   = "dev"
	Commit    = "dirty"
	BuiltBy   = os.Getenv("USER")
	BuildDate = time.Now().String()
)
View Source
var AuthCmd = &cobra.Command{

	Use: "auth",

	Short: "authentication subcommands",

	Long: authLong,
}
View Source
var BashCompletionCmd = &cobra.Command{

	Use: "bash-completion",

	Aliases: []string{
		"bash",
		"completions",
	},

	Short: "Generate  Bash completions",

	Long: BashCompletionLong,

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

		RootCmd.GenBashCompletion(os.Stdout)
	},
}
View Source
var BashCompletionLong = `` /* 192-byte string literal not displayed */
View Source
var CmdCmd = &cobra.Command{

	Use: "cmd [flags] [cmd] [args]",

	Short: "run commands defined in _tool.cue files",

	Long: cmdLong,

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

		flags := []string{}
		msg, err := lib.Cmd(flags, args, "")
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
		fmt.Println(msg)

	},
}
View Source
var ConfigCmd = &cobra.Command{

	Use: "config",

	Short: "configuration subcommands",

	Long: configLong,
}
View Source
var CueCmd = &cobra.Command{

	Use: "cue",

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

	Short: "Call a cue command",

	Long: cueLong,

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

		fmt.Println("run: cue", args)

	},
}
View Source
var GenCmd = &cobra.Command{

	Use: "gen [files...]",

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

	Short: "generate code, data, and config",

	Long: genLong,

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

		msg, err := lib.Gen(args, []string{}, "")
		if err != nil {
			fmt.Println(err)
			os.Exit(1)
		}
		fmt.Println(msg)

	},
}
View Source
var ModCmd = &cobra.Command{

	Use: "mod",

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

	Short: "manage project modules",

	Long: modLong,

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

		fmt.Println("hof mod")

	},
}
View Source
var NewCmd = &cobra.Command{

	Use: "new",

	Short: "create a new project or subcomponent or files",

	Long: newLong,

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

		fmt.Println("hof new")

	},
}
View Source
var RootCmd = &cobra.Command{

	Use: "hof",

	Short: "hof is the cli for hof-lang, a low-code framework for developers",

	Long: hofLong,

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

		lib.InitLangs()

	},
}
View Source
var StudiosCmd = &cobra.Command{

	Use: "studios",

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

	Short: "commands for working with Hofstadter Studios",

	Long: studiosLong,
}
View Source
var VersionCmd = &cobra.Command{

	Use: "version",

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

	Short: "print the version",

	Long: VersionLong,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Printf("Version:    %v\nCommit:     %v\nBuiltBy:    %v\nBuildDate:  %v\n", Version, Commit, BuiltBy, BuildDate)
	},
}
View Source
var VersionLong = `Print the build version for hof`

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
app

Jump to

Keyboard shortcuts

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