Rename guiAssets to assetDir for consistency

This commit is contained in:
Anderson Mesquita 2015-12-18 12:00:59 -05:00
parent 490962ccdb
commit b014967550

View File

@ -209,7 +209,7 @@ type RuntimeOptions struct {
generateDir string generateDir string
noRestart bool noRestart bool
profiler string profiler string
guiAssets string assetDir string
cpuProfile bool cpuProfile bool
stRestarting bool stRestarting bool
logFlags int logFlags int
@ -219,15 +219,15 @@ func defaultRuntimeOptions() RuntimeOptions {
options := RuntimeOptions{ options := RuntimeOptions{
noRestart: os.Getenv("STNORESTART") != "", noRestart: os.Getenv("STNORESTART") != "",
profiler: os.Getenv("STPROFILER"), profiler: os.Getenv("STPROFILER"),
guiAssets: os.Getenv("STGUIASSETS"), assetDir: os.Getenv("STGUIASSETS"),
cpuProfile: os.Getenv("STCPUPROFILE") != "", cpuProfile: os.Getenv("STCPUPROFILE") != "",
stRestarting: os.Getenv("STRESTART") != "", stRestarting: os.Getenv("STRESTART") != "",
logFile: "-", // Output to stdout logFile: "-", // Output to stdout
logFlags: log.Ltime, logFlags: log.Ltime,
} }
if options.guiAssets != "" { if options.assetDir != "" {
options.guiAssets = locations[locGUIAssets] options.assetDir = locations[locGUIAssets]
} }
if os.Getenv("STTRACE") != "" { if os.Getenv("STTRACE") != "" {
@ -976,7 +976,7 @@ func setupGUI(mainSvc *suture.Supervisor, cfg *config.Wrapper, m *model.Model, a
l.Warnln("Insecure admin access is enabled.") l.Warnln("Insecure admin access is enabled.")
} }
api, err := newAPISvc(myID, cfg, runtimeOptions.guiAssets, m, apiSub, discoverer, relaySvc, errors, systemLog) api, err := newAPISvc(myID, cfg, runtimeOptions.assetDir, m, apiSub, discoverer, relaySvc, errors, systemLog)
if err != nil { if err != nil {
l.Fatalln("Cannot start GUI:", err) l.Fatalln("Cannot start GUI:", err)
} }