Skip to content

Commit

Permalink
Merge pull request #3 from chakphanu/patch-1
Browse files Browse the repository at this point in the history
Update config.go
  • Loading branch information
patrickxb committed Mar 31, 2015
2 parents de92e72 + cbc8a8d commit 343ed1f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,12 @@ func (c *Config) GetArray(key string) []interface{} {
}
return result.([]interface{})
}

// Returns an map for the config variable key
func (c *Config) GetMap(key string) map[string]interface{} {
result, present := c.data[key]
if !present {
return map[string]interface{}(nil)
}
return result.(map[string]interface{})
}

0 comments on commit 343ed1f

Please sign in to comment.