forked from TrueCloudLab/rclone
Update vendor directory
This commit is contained in:
parent
c265f451f2
commit
34b9ac8a5d
54 changed files with 4253 additions and 283 deletions
20
vendor/github.com/Unknwon/goconfig/conf.go
generated
vendored
20
vendor/github.com/Unknwon/goconfig/conf.go
generated
vendored
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue