mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-11-14 12:43:04 -08:00
comments
This commit is contained in:
3 files changed
+11
-2
No files matched your search
@@ -1,9 +1,18 @@
|
||||
package core
|
||||
|
||||
// PluginMetadata contains some brief information regarding a plugin.
|
||||
type PluginMetadata struct {
|
||||
// Name of the plugin
|
||||
Name string
|
||||
}
|
||||
|
||||
// GetMetadataFuncName is the name of the function in the plugin to return PluginMetadata.
|
||||
const GetMetadataFuncName = "GetPluginMetadata"
|
||||
|
||||
// GetMetadataFunc is the type of the function in the plugin to return PluginMetadata.
|
||||
type GetMetadataFunc func() PluginMetadata
|
||||
|
||||
// LoadPlugins loads all possible plugins in the 'plugin' directory.
|
||||
func LoadPlugins() error {
|
||||
return loadPluginsInternal()
|
||||
}
|
||||
+1
-1
@@ -12,7 +12,7 @@ import (
|
||||
"v2ray.com/core/common/platform"
|
||||
)
|
||||
|
||||
func LoadPlugins() error {
|
||||
func loadPluginsInternal() error {
|
||||
pluginPath := platform.GetPluginDirectory()
|
||||
|
||||
dir, err := os.Open(pluginPath)
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
|
||||
package core
|
||||
|
||||
func LoadPlugins() error {
|
||||
func loadPluginsInternal() error {
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user