Skip to content
Snippets Groups Projects
Commit 2d34a35d authored by Hans Moog's avatar Hans Moog
Browse files

Fix: fix CLI plugin load order

parent 40ef9dda
No related branches found
No related tags found
No related merge requests found
package node
import (
"fmt"
"strings"
"sync"
......@@ -22,14 +21,6 @@ func Load(plugins ...*Plugin) *Node {
disabledPlugins[strings.ToLower(disabledPlugin)] = true
}
fmt.Println(" _____ _ _ ________ ______ ___ ___________ ")
fmt.Println(" / ___| | | |_ _| \\/ || \\/ || ___| ___ \\")
fmt.Println(" \\ `--.| |_| | | | | . . || . . || |__ | |_/ /")
fmt.Println(" `--. \\ _ | | | | |\\/| || |\\/| || __|| / ")
fmt.Println(" /\\__/ / | | |_| |_| | | || | | || |___| |\\ \\ ")
fmt.Println(" \\____/\\_| |_/\\___/\\_| |_/\\_| |_/\\____/\\_| \\_| fullnode 1.0")
fmt.Println()
node := &Node{
logLevel: *LOG_LEVEL.Value,
loggers: make([]*Logger, 0),
......@@ -105,8 +96,6 @@ func (node *Node) LogFailure(pluginName string, message string) {
}
func (node *Node) Load(plugins ...*Plugin) {
node.LogInfo("Node", "Loading plugins ...")
if len(plugins) >= 1 {
for _, plugin := range plugins {
if _, exists := disabledPlugins[strings.ToLower(strings.Replace(plugin.Name, " ", "", -1))]; !exists {
......
......@@ -2,6 +2,7 @@ package cli
import (
"flag"
"fmt"
"strings"
"github.com/iotaledger/goshimmer/packages/events"
......@@ -34,10 +35,22 @@ func init() {
parameter.Events.AddString.Attach(events.NewClosure(onAddStringParameter))
flag.Usage = printUsage
}
func configure(ctx *node.Plugin) {
flag.Parse()
}
func configure(ctx *node.Plugin) {}
fmt.Println(" _____ _ _ ________ ______ ___ ___________ ")
fmt.Println(" / ___| | | |_ _| \\/ || \\/ || ___| ___ \\")
fmt.Println(" \\ `--.| |_| | | | | . . || . . || |__ | |_/ /")
fmt.Println(" `--. \\ _ | | | | |\\/| || |\\/| || __|| / ")
fmt.Println(" /\\__/ / | | |_| |_| | | || | | || |___| |\\ \\ ")
fmt.Println(" \\____/\\_| |_/\\___/\\_| |_/\\_| |_/\\____/\\_| \\_| fullnode 1.0")
fmt.Println()
ctx.Node.LogInfo("Node", "Loading plugins ...")
}
var PLUGIN = node.NewPlugin("CLI", configure)
var PLUGIN = node.NewPlugin("CLI", configure, func(plugin *node.Plugin) {
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment