nits
This commit is contained in:
parent
80e02c90e3
commit
feb6ccc72b
@ -20,7 +20,7 @@ package geth
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path/filepath"
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@ -346,7 +346,7 @@ func geth(ctx *cli.Context) error {
|
|||||||
if ctx.IsSet(utils.PluginsDirFlag.Name) {
|
if ctx.IsSet(utils.PluginsDirFlag.Name) {
|
||||||
pluginsDir = ctx.String(utils.PluginsDirFlag.Name)
|
pluginsDir = ctx.String(utils.PluginsDirFlag.Name)
|
||||||
} else {
|
} else {
|
||||||
pluginsDir = path.Join(ctx.String(utils.DataDirFlag.Name), "plugins")
|
pluginsDir = filepath.Join(ctx.String(utils.DataDirFlag.Name), "plugins")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := plugins.Initialize(pluginsDir, ctx); err != nil {
|
if err := plugins.Initialize(pluginsDir, ctx); err != nil {
|
||||||
|
@ -91,7 +91,8 @@ var (
|
|||||||
//begin PluGeth code injection
|
//begin PluGeth code injection
|
||||||
PluginsDirFlag = &flags.DirectoryFlag{
|
PluginsDirFlag = &flags.DirectoryFlag{
|
||||||
Name: "pluginsdir",
|
Name: "pluginsdir",
|
||||||
Usage: "Directory for plugins (default = datadir/plugins)",
|
Usage: "Directory for plugins",
|
||||||
|
Value: flags.DirectoryString(filepath.Join("<datadir>", "plugins")),
|
||||||
Category: flags.EthCategory,
|
Category: flags.EthCategory,
|
||||||
}
|
}
|
||||||
//end PluGeth code injection
|
//end PluGeth code injection
|
||||||
|
@ -58,7 +58,7 @@ func Lookup(name string, validate func(interface{}) bool) []interface{} {
|
|||||||
var DefaultPluginLoader *PluginLoader
|
var DefaultPluginLoader *PluginLoader
|
||||||
|
|
||||||
func NewPluginLoader(target string) (*PluginLoader, error) {
|
func NewPluginLoader(target string) (*PluginLoader, error) {
|
||||||
log.Info("Loading plugins from directory.", "path", target)
|
log.Info("Loading plugins from directory", "path", target)
|
||||||
pl := &PluginLoader{
|
pl := &PluginLoader{
|
||||||
Plugins: []pluginDetails{},
|
Plugins: []pluginDetails{},
|
||||||
Subcommands: make(map[string]Subcommand),
|
Subcommands: make(map[string]Subcommand),
|
||||||
|
Loading…
Reference in New Issue
Block a user