Update for Go 1.

This commit is contained in:
Mikkel Krautz 2012-02-06 22:16:16 +01:00
parent 4114a83d64
commit e46a65109f
31 changed files with 901 additions and 202 deletions

View file

@ -90,13 +90,13 @@ func (cfg *Config) IntValue(key string) (intval int) {
// Get the value of a specific config key as a uint32
func (cfg *Config) Uint32Value(key string) (uint32val uint32) {
str := cfg.StringValue(key)
uintval, _ := strconv.Atoui(str)
uintval, _ := strconv.ParseUint(str, 10, 0)
return uint32(uintval)
}
// Get the value fo a sepcific config key as a bool
func (cfg *Config) BoolValue(key string) (boolval bool) {
str := cfg.StringValue(key)
boolval, _ = strconv.Atob(str)
boolval, _ = strconv.ParseBool(str)
return
}