Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
goshimmer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iota-imt
goshimmer
Commits
2d34a35d
Commit
2d34a35d
authored
5 years ago
by
Hans Moog
Browse files
Options
Downloads
Patches
Plain Diff
Fix: fix CLI plugin load order
parent
40ef9dda
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/node/node.go
+0
-11
0 additions, 11 deletions
packages/node/node.go
plugins/cli/plugin.go
+16
-3
16 additions, 3 deletions
plugins/cli/plugin.go
with
16 additions
and
14 deletions
packages/node/node.go
+
0
−
11
View file @
2d34a35d
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
{
...
...
This diff is collapsed.
Click to expand it.
plugins/cli/plugin.go
+
16
−
3
View file @
2d34a35d
...
...
@@ -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
)
{
})
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment