Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetAllInstalledPluginsWithVersion = func() ([]PluginInfo, error) { pluginInstallPrefixes, err := common.GetPluginInstallPrefixes() if err != nil { return nil, err } allPlugins := make(map[string]PluginInfo, 0) for _, prefix := range pluginInstallPrefixes { files, err := ioutil.ReadDir(prefix) if err != nil { return nil, err } for _, file := range files { pluginDir, err := os.Stat(filepath.Join(prefix, file.Name())) if err != nil { continue } if !pluginDir.IsDir() { continue } latestPlugin, err := GetLatestInstalledPlugin(filepath.Join(prefix, file.Name())) if err != nil { continue } allPlugins[file.Name()] = *latestPlugin } } return sortPlugins(allPlugins), nil }
GetAllInstalledPluginsWithVersion Fetches Latest version of all installed plugins.
Functions ¶
This section is empty.
Types ¶
type PluginInfo ¶
func GetLatestInstalledPlugin ¶
func GetLatestInstalledPlugin(pluginDir string) (*PluginInfo, error)
func GetPluginsInfo ¶
func GetPluginsInfo() ([]PluginInfo, error)
Click to show internal directories.
Click to hide internal directories.