Documentation ¶
Index ¶
- Constants
- Variables
- func CallTS(ts *runtime.Script, args []string) error
- func FeedbackRun(args []string) (err error)
- func FlowRun(entrypoints []string) (err error)
- func GebRun(args []string) (err error)
- func GenRun(args []string) (err error)
- func HackRun(args []string) (err error)
- func InstallUpdate() (err error)
- func LogoRun(args []string) (err error)
- func ModPersistentPreRun(args []string) (err error)
- func PrintUpdateAvailable()
- func RootInit()
- func RootPersistentPostRun(args []string) (err error)
- func RootPersistentPreRun(args []string) (err error)
- func RunErr() error
- func RunExit()
- func RunInt() int
- func RunRun(args []string) (err error)
- func WaitPrintUpdateAvailable()
- type ProgramVersion
Constants ¶
View Source
const RootCustomHelp = `` /* 922-byte string literal not displayed */
Variables ¶
View Source
var ( UpdateCheckFlag bool UpdateVersionFlag string UpdateStarted bool UpdateErrored bool UpdateChecked bool UpdateAvailable *ProgramVersion UpdateData []interface{} )
View Source
var BashCompletionCmd = &cobra.Command{ Use: "bash", Short: "Generate Bash completions", Long: BashCompletionLong, Run: func(cmd *cobra.Command, args []string) { RootCmd.GenBashCompletionV2(os.Stdout, false) }, }
View Source
var BashCompletionLong = `` /* 214-byte string literal not displayed */
View Source
var CompletionCmd = &cobra.Command{ Use: "completion", Aliases: []string{"completions"}, Short: "Generate completion helpers for popular terminals", Long: "Generate completion helpers for popular terminals", }
View Source
var (
CompletionVanillaFlag bool
)
View Source
var DatamodelCmd = &cobra.Command{ Use: "datamodel", Aliases: []string{ "dm", }, Short: "manage, diff, and migrate your data models", Long: datamodelLong, }
View Source
var FeedbackCmd = &cobra.Command{ Use: "feedback [email] <message>", Aliases: []string{ "hi", "say", "from", "bug", "yo", "hello", "greetings", "support", }, Short: "send feedback, bug reports, or any message", Long: feedbackLong, Run: func(cmd *cobra.Command, args []string) { var err error err = FeedbackRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var FishCompletionCmd = &cobra.Command{ Use: "fish", Short: "Generate Fish completions", Long: "Generate Fish completions", Run: func(cmd *cobra.Command, args []string) { RootCmd.GenFishCompletion(os.Stdout, true) }, }
View Source
var FlowCmd = &cobra.Command{ Use: "flow [cue files...] [@flow/name...] [+key=value]", Aliases: []string{ "f", }, Short: "run CUE pipelines with the hof/flow DAG engine", Long: flowLong, Run: func(cmd *cobra.Command, args []string) { var err error var globs []string if 0 < len(args) { globs = args[0:] } err = FlowRun(globs) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var GebCmd = &cobra.Command{ Use: "_geb", Hidden: true, Run: func(cmd *cobra.Command, args []string) { var err error err = GebRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var GenCmd = &cobra.Command{ Use: "gen [files...]", Aliases: []string{ "G", }, Short: "modular and composable code gen: CUE & data + templates = _", Long: genLong, Run: func(cmd *cobra.Command, args []string) { var err error err = GenRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var HackCmd = &cobra.Command{ Use: "hack ...", Hidden: true, Aliases: []string{ "h", "x", }, Short: "development command", Long: hackLong, Run: func(cmd *cobra.Command, args []string) { var err error err = HackRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var LogoCmd = &cobra.Command{ Use: "_", Hidden: true, Run: func(cmd *cobra.Command, args []string) { var err error err = LogoRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var ModCmd = &cobra.Command{ Use: "mod", Aliases: []string{ "m", }, Short: "polyglot dependency management based on go mods and MVS", Long: modLong, PersistentPreRun: func(cmd *cobra.Command, args []string) { var err error err = ModPersistentPreRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var PowerShellCompletionCmd = &cobra.Command{ Use: "power-shell", Aliases: []string{"windows", "win", "power", "ps"}, Short: "Generate PowerShell completions", Long: "Generate PowerShell completions", Run: func(cmd *cobra.Command, args []string) { RootCmd.GenPowerShellCompletion(os.Stdout) }, }
View Source
var RootCmd = &cobra.Command{ Use: "hof", Short: "The High Code Framework", Long: hofLong, PersistentPreRun: func(cmd *cobra.Command, args []string) { var err error err = RootPersistentPreRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, PersistentPostRun: func(cmd *cobra.Command, args []string) { var err error err = RootPersistentPostRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var RunCmd = &cobra.Command{ Use: "run", Aliases: []string{ "r", }, Short: "Hof Line Script (HLS) is a successor to bash and python based scripting", Long: runLong, Run: func(cmd *cobra.Command, args []string) { var err error err = RunRun(args) if err != nil { fmt.Println(err) os.Exit(1) } }, }
View Source
var UpdateCmd = &cobra.Command{ Use: "update", Short: "update the hof tool", Long: UpdateLong, PreRun: func(cmd *cobra.Command, args []string) { }, Run: func(cmd *cobra.Command, args []string) { latest, err := CheckUpdate(true) if err != nil { fmt.Println(err) os.Exit(-1) } cur := ProgramVersion{Version: "v" + verinfo.Version} if latest.Version == cur.Version || (UpdateVersionFlag == "" && cur.Version == "vLocal") { return } else { if UpdateCheckFlag { PrintUpdateAvailable() return } } err = InstallUpdate() if err != nil { fmt.Println(err) os.Exit(-1) } }, }
View Source
var UpdateLong = `Print the build version for hof`
View Source
var VersionCmd = &cobra.Command{ Use: "version", Aliases: []string{ "ver", }, Short: "print the version", Long: VersionLong, Run: func(cmd *cobra.Command, args []string) { s, e := os.UserConfigDir() fmt.Printf("hof ConfigDir %q %v\n", filepath.Join(s, "hof"), e) fmt.Printf( versionMessage, verinfo.Version, verinfo.Commit, verinfo.BuildDate, verinfo.GoVersion, verinfo.BuildOS, verinfo.BuildArch, ) }, }
View Source
var VersionLong = `Print the build version for hof`
Functions ¶
func FeedbackRun ¶
func InstallUpdate ¶
func InstallUpdate() (err error)
func ModPersistentPreRun ¶
func PrintUpdateAvailable ¶
func PrintUpdateAvailable()
func RootPersistentPostRun ¶
func RootPersistentPreRun ¶
func WaitPrintUpdateAvailable ¶
func WaitPrintUpdateAvailable()
Types ¶
type ProgramVersion ¶
func CheckUpdate ¶
func CheckUpdate(manual bool) (ver ProgramVersion, err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.