|
|
@ -75,11 +75,11 @@ func ReadConfig(base string, logTypes LoggerType, g *globalconf.GlobalConf, id s |
|
|
|
if Config == nil { |
|
|
|
if Config == nil { |
|
|
|
path := ApplicationFolder(base) |
|
|
|
path := ApplicationFolder(base) |
|
|
|
|
|
|
|
|
|
|
|
Config = &config{ExecPath: path, Debug: true, Ver: "0.5.0 RC12"} |
|
|
|
Config = &config{ExecPath: path, Debug: true, Ver: "0.5.12"} |
|
|
|
Config.conf = g |
|
|
|
Config.conf = g |
|
|
|
Config.Identifier = id |
|
|
|
Config.Identifier = id |
|
|
|
Config.Log = NewLogger(logTypes, LogLevelDebug) |
|
|
|
Config.Log = NewLogger(logTypes, LogLevelDebug) |
|
|
|
Config.SetClientString("/Ethereum(G)") |
|
|
|
Config.SetClientString("Ethereum(G)") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Config |
|
|
|
return Config |
|
|
@ -88,11 +88,9 @@ func ReadConfig(base string, logTypes LoggerType, g *globalconf.GlobalConf, id s |
|
|
|
// Set client string
|
|
|
|
// Set client string
|
|
|
|
//
|
|
|
|
//
|
|
|
|
func (c *config) SetClientString(str string) { |
|
|
|
func (c *config) SetClientString(str string) { |
|
|
|
id := runtime.GOOS |
|
|
|
os := runtime.GOOS |
|
|
|
if len(c.Identifier) > 0 { |
|
|
|
cust := c.Identifier |
|
|
|
id = c.Identifier |
|
|
|
Config.ClientString = fmt.Sprintf("%s/v%s/%s/%s/Go", str, c.Ver, cust, os) |
|
|
|
} |
|
|
|
|
|
|
|
Config.ClientString = fmt.Sprintf("%s nv%s/%s", str, c.Ver, id) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (c *config) SetIdentifier(id string) { |
|
|
|
func (c *config) SetIdentifier(id string) { |
|
|
|