PluginHome returns the plugin configuration directory to: 1. The $CF_PLUGIN_HOME/.cf/plugins environment variable if set 2. Defaults to the home directory (outlined in LoadConfig)/.cf/plugins
()
| 116 | // 1. The $CF_PLUGIN_HOME/.cf/plugins environment variable if set |
| 117 | // 2. Defaults to the home directory (outlined in LoadConfig)/.cf/plugins |
| 118 | func (config *Config) PluginHome() string { |
| 119 | if config.ENV.CFPluginHome != "" { |
| 120 | return filepath.Join(config.ENV.CFPluginHome, ".cf", "plugins") |
| 121 | } |
| 122 | |
| 123 | return filepath.Join(homeDirectory(), ".cf", "plugins") |
| 124 | } |
| 125 | |
| 126 | // Plugins returns installed plugins from the config sorted by name (case-insensitive). |
| 127 | func (config *Config) Plugins() []Plugin { |
no test coverage detected