added config flixble system
This commit is contained in:
@@ -24,7 +24,7 @@ func DownloadPlugin(pluginurl string) error {
|
||||
// Replaces / with _
|
||||
folder := strings.Replace(path, "/", "_", -1)
|
||||
// Reads plugin path from the config path
|
||||
config, err := config.ConfigInit()
|
||||
config, err := config.ConfigInit(nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -44,7 +44,7 @@ func DownloadPlugin(pluginurl string) error {
|
||||
// DeletePlugin The following function deletes a plugin based on
|
||||
// the plugin name provided.
|
||||
func DeletePlugin(pluginname string) error {
|
||||
config, err := config.ConfigInit()
|
||||
config, err := config.ConfigInit(nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ type Host struct {
|
||||
|
||||
// DetectPlugins Detects all the plugins available
|
||||
func DetectPlugins() (*Plugins, error) {
|
||||
config, err := config.ConfigInit()
|
||||
config, err := config.ConfigInit(nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -141,7 +141,7 @@ func RunPlugin(pluginName string, IPAddresses []*ExecuteIP) (*Plugin, error) {
|
||||
plugindetected = plugin
|
||||
plugindetected.Execute = IPAddresses
|
||||
// Get Execute plugin path from config file
|
||||
config, err := config.ConfigInit()
|
||||
config, err := config.ConfigInit(nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ func TestExecuteIP_ModifyHost(t *testing.T) {
|
||||
var testip ExecuteIP
|
||||
|
||||
// Get plugin path from config file
|
||||
Config, err := config.ConfigInit()
|
||||
Config, err := config.ConfigInit(nil)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
t.Fail()
|
||||
|
||||
Reference in New Issue
Block a user