azureblob: use lib/encoder

This commit is contained in:
Nick Craig-Wood
2019-09-30 22:00:24 +01:00
parent 53bec33027
commit 35d6ff89bf
3 changed files with 41 additions and 7 deletions
+10 -1
View File
@@ -262,6 +262,14 @@ const Swift = encoder.MultiEncoder(
encoder.EncodeInvalidUtf8 |
encoder.EncodeSlash)
// AzureBlob is the encoding used by the azureblob backend
const AzureBlob = encoder.MultiEncoder(
encoder.EncodeInvalidUtf8 |
encoder.EncodeSlash |
encoder.EncodeCtl |
encoder.EncodeDel |
encoder.EncodeBackSlash |
encoder.EncodeRightPeriod)
// ByName returns the encoder for a give backend name or nil
func ByName(name string) encoder.Encoder {
@@ -272,7 +280,8 @@ func ByName(name string) encoder.Encoder {
return Display
case "amazonclouddrive":
return AmazonCloudDrive
//case "azureblob":
case "azureblob":
return AzureBlob
case "b2":
return B2
case "box":