Created
August 11, 2014 20:40
-
-
Save scorphus/0013b2dc3453b7e82ba7 to your computer and use it in GitHub Desktop.
maxMemory from conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var maxMemory int | |
func maxMemoryValue() int { | |
if maxMemory > 0 { | |
return maxMemory | |
} | |
var err error | |
maxMemory, err = config.GetInt("api:request:maxMemory") | |
if err != nil { | |
panic("You should configure a api:request:maxMemory for gandalf.") | |
} | |
return maxMemory | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment