Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildCmd = &cobra.Command{ Use: "build", Short: "rebuilds the plugins cache", RunE: func(cmd *cobra.Command, args []string) error { os.RemoveAll(plugins.CachePath) _, err := plugins.Available() return err }, }
BuildCmd rebuilds the plugins cache
View Source
var CleanCmd = &cobra.Command{ Use: "clean", Short: "cleans the plugins cache", RunE: func(cmd *cobra.Command, args []string) error { os.RemoveAll(plugins.CachePath) return nil }, }
CleanCmd cleans the plugins cache
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "displays the contents of the plugin cache", RunE: func(cmd *cobra.Command, args []string) error { b, err := ioutil.ReadFile(plugins.CachePath) if err != nil { return err } m := map[string]interface{}{} err = json.Unmarshal(b, &m) if err != nil { return err } is, err := json.MarshalIndent(m, "", " ") if err != nil { return err } fmt.Println(string(is)) return nil }, }
ListCmd displays the contents of the plugin cache
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.