1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-06 02:23:24 +00:00

configmap: add ClearSetters to get rid of all setters #5178

This commit is contained in:
Nick Craig-Wood
2021-04-03 15:31:13 +01:00
parent ddb7eb6e0a
commit 1a41c930f3
2 changed files with 21 additions and 0 deletions

View File

@@ -60,6 +60,12 @@ func (c *Map) AddSetter(setter Setter) *Map {
return c
}
// ClearSetters removes all the setters set so far
func (c *Map) ClearSetters() *Map {
c.setters = nil
return c
}
// get gets an item with the key passed in and return the value from
// the first getter. If the item is found then it returns true,
// otherwise false.