mirror of
https://github.com/rclone/rclone.git
synced 2026-01-03 09:03:50 +00:00
vfs: re-implement CacheMode with fs.Enum
This almost 100% backwards compatible. The only difference being that in the rc options/get output CacheMode will be output as strings instead of integers. This is a lot more convenient for the user. They still accept integer inputs though so the fallout from this should be minimal.
This commit is contained in:
@@ -18,7 +18,7 @@ var _ json.Unmarshaler = (*CacheMode)(nil)
|
||||
func TestCacheModeString(t *testing.T) {
|
||||
assert.Equal(t, "off", CacheModeOff.String())
|
||||
assert.Equal(t, "full", CacheModeFull.String())
|
||||
assert.Equal(t, "CacheMode(17)", CacheMode(17).String())
|
||||
assert.Equal(t, "Unknown(17)", CacheMode(17).String())
|
||||
}
|
||||
|
||||
func TestCacheModeSet(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user