init: Honor config-dir flag when it is passed as global or local flag (#3337)

setGlobalsFromContext() is added to sets global variable after parsing
command line arguments.
This commit is contained in:
Anis Elleuch
2016-11-24 02:13:40 +01:00
committed by Harshavardhana
parent d711ff454e
commit e2ef95af7d
5 changed files with 89 additions and 64 deletions
+4 -3
View File
@@ -53,11 +53,12 @@ const (
)
var (
globalQuiet = false // Quiet flag set via command line.
globalIsDistXL = false // "Is Distributed?" flag.
globalQuiet = false // quiet flag set via command line.
globalConfigDir = mustGetConfigPath() // config-dir flag set via command line
// Add new global flags here.
globalIsDistXL = false // "Is Distributed?" flag.
// Maximum cache size.
globalMaxCacheSize = uint64(maxCacheSize)
// Cache expiry.