rename internal environment switches

master
Oliver Tonnhofer 2013-09-02 13:09:26 +02:00
parent c8586caf39
commit 8e0665aa12
2 changed files with 5 additions and 5 deletions

2
cache/config.go vendored
View File

@ -94,7 +94,7 @@ func init() {
panic(err) panic(err)
} }
cacheConfFile := os.Getenv("GOPOSM_CACHE_CONFIG") cacheConfFile := os.Getenv("IMPOSM_CACHE_CONFIG")
if cacheConfFile != "" { if cacheConfFile != "" {
data, err := ioutil.ReadFile(cacheConfFile) data, err := ioutil.ReadFile(cacheConfFile)
if err != nil { if err != nil {

View File

@ -20,13 +20,13 @@ var skipCoords, skipNodes, skipWays bool
var nParser, nWays, nRels, nNodes, nCoords int64 var nParser, nWays, nRels, nNodes, nCoords int64
func init() { func init() {
if os.Getenv("GOPOSM_SKIP_COORDS") != "" { if os.Getenv("IMPOSM_SKIP_COORDS") != "" {
skipCoords = true skipCoords = true
} }
if os.Getenv("GOPOSM_SKIP_NODES") != "" { if os.Getenv("IMPOSM_SKIP_NODES") != "" {
skipNodes = true skipNodes = true
} }
if os.Getenv("GOPOSM_SKIP_WAYS") != "" { if os.Getenv("IMPOSM_SKIP_WAYS") != "" {
skipWays = true skipWays = true
} }
nParser = int64(runtime.NumCPU()) nParser = int64(runtime.NumCPU())
@ -34,7 +34,7 @@ func init() {
nRels = int64(runtime.NumCPU()) nRels = int64(runtime.NumCPU())
nNodes = int64(runtime.NumCPU()) nNodes = int64(runtime.NumCPU())
nCoords = int64(runtime.NumCPU()) nCoords = int64(runtime.NumCPU())
if procConf := os.Getenv("GOPOSM_READ_PROCS"); procConf != "" { if procConf := os.Getenv("IMPOSM_READ_PROCS"); procConf != "" {
parts := strings.Split(procConf, ":") parts := strings.Split(procConf, ":")
nParser, _ = strconv.ParseInt(parts[0], 10, 32) nParser, _ = strconv.ParseInt(parts[0], 10, 32)
nRels, _ = strconv.ParseInt(parts[1], 10, 32) nRels, _ = strconv.ParseInt(parts[1], 10, 32)