Update vendor directory

This commit is contained in:
Nick Craig-Wood 2016-12-04 16:25:30 +00:00
parent c265f451f2
commit 34b9ac8a5d
54 changed files with 4253 additions and 283 deletions

View file

@ -123,6 +123,11 @@ func (c *ConfigFile) DeleteKey(section, key string) bool {
section = DEFAULT_SECTION
}
if c.BlockMode {
c.lock.Lock()
defer c.lock.Unlock()
}
// Check if section exists.
if _, ok := c.data[section]; !ok {
return false
@ -358,6 +363,11 @@ func (c *ConfigFile) GetKeyList(section string) []string {
section = DEFAULT_SECTION
}
if c.BlockMode {
c.lock.RLock()
defer c.lock.RUnlock()
}
// Check if section exists.
if _, ok := c.data[section]; !ok {
return nil
@ -382,6 +392,11 @@ func (c *ConfigFile) DeleteSection(section string) bool {
section = DEFAULT_SECTION
}
if c.BlockMode {
c.lock.Lock()
defer c.lock.Unlock()
}
// Check if section exists.
if _, ok := c.data[section]; !ok {
return false
@ -412,6 +427,11 @@ func (c *ConfigFile) GetSection(section string) (map[string]string, error) {
section = DEFAULT_SECTION
}
if c.BlockMode {
c.lock.Lock()
defer c.lock.Unlock()
}
// Check if section exists.
if _, ok := c.data[section]; !ok {
// Section does not exist.