aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/config.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-27 23:15:44 +0800
committerobscuren <geffobscura@gmail.com>2014-04-27 23:16:53 +0800
commit338b6980915c990c6e6287a7249ddd98e6be20eb (patch)
treed5c33a03c473dab1de0daade37a2d12986084faa /ethutil/config.go
parent16e52327a4baa5547c38965fce53b3ff40b98173 (diff)
downloaddexon-338b6980915c990c6e6287a7249ddd98e6be20eb.tar
dexon-338b6980915c990c6e6287a7249ddd98e6be20eb.tar.gz
dexon-338b6980915c990c6e6287a7249ddd98e6be20eb.tar.bz2
dexon-338b6980915c990c6e6287a7249ddd98e6be20eb.tar.lz
dexon-338b6980915c990c6e6287a7249ddd98e6be20eb.tar.xz
dexon-338b6980915c990c6e6287a7249ddd98e6be20eb.tar.zst
dexon-338b6980915c990c6e6287a7249ddd98e6be20eb.zip
Refactoring and added documentation comments
Diffstat (limited to 'ethutil/config.go')
-rw-r--r--ethutil/config.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/ethutil/config.go b/ethutil/config.go
index 86c0a855d..323773ba7 100644
--- a/ethutil/config.go
+++ b/ethutil/config.go
@@ -9,6 +9,7 @@ import (
"runtime"
)
+// Log types available
type LogType byte
const (
@@ -16,7 +17,7 @@ const (
LogTypeFile = 2
)
-// Config struct isn't exposed
+// Config struct
type config struct {
Db Database
@@ -31,7 +32,9 @@ type config struct {
var Config *config
-// Read config doesn't read anything yet.
+// Read config
+//
+// Initialize the global Config variable with default settings
func ReadConfig(base string) *config {
if Config == nil {
usr, _ := user.Current()
@@ -56,6 +59,8 @@ func ReadConfig(base string) *config {
return Config
}
+// Set client string
+//
func (c *config) SetClientString(str string) {
Config.ClientString = fmt.Sprintf("%s nv%s/%s", str, c.Ver, runtime.GOOS)
}