Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusNone = iota StatusDone StatusNotFound )
Variables ¶
View Source
var InstallCmd = &cobra.Command{ Use: "install [plugin url]", Short: "Install a plugin", Long: `Install a plugin given a link to the plugin's metadata JSON`, Args: cobra.ExactArgs(1), Aliases: []string{"i", "in"}, Run: func(cmd *cobra.Command, args []string) { validate := validator.New(validator.WithRequiredStructEnabled()) err := validate.Var(args[0], "http_url") if err != nil { fmt.Println("Please enter a valid http url") os.Exit(1) } p := tea.NewProgram(initialInstallModel(args[0])) if model, err := p.Run(); err != nil { fmt.Printf("Alas, there's been an error: %v", err) } else if model, ok := model.(installModel); ok { fatalHandler.Handle(model.errorHandler) } else { log.Fatal("unexpected model type") } }, }
View Source
var RemoveCmd = &cobra.Command{ Use: "remove", Short: "Remove a plugin", Long: `Remove the plugin with the name specified`, Args: cobra.ExactArgs(1), Aliases: []string{"r", "rm"}, Run: func(cmd *cobra.Command, args []string) { p := tea.NewProgram(initialRemoveModel(args[0])) if model, err := p.Run(); err != nil { log.Fatal(err) } else if model, ok := model.(removeModel); ok { fatalHandler.Handle(model.errorHandler) } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.