aboutsummaryrefslogtreecommitdiff
path: root/weed/util/parse.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2022-02-07 18:32:16 -0800
committerGitHub <noreply@github.com>2022-02-07 18:32:16 -0800
commita2ac540ecc765689fb75f0f97c0260570a586500 (patch)
treeb97105e65640be5bdd9727936ea3a9157b462565 /weed/util/parse.go
parentb1cff07ab0541200b26d345d1d396fddcba66d79 (diff)
parent7f0c79308309660b9e0c7e04e90b9c199bd67839 (diff)
downloadseaweedfs-a2ac540ecc765689fb75f0f97c0260570a586500.tar.xz
seaweedfs-a2ac540ecc765689fb75f0f97c0260570a586500.zip
Merge pull request #2645 from guol-fnst/fix_Precedence
fix preconditions
Diffstat (limited to 'weed/util/parse.go')
-rw-r--r--weed/util/parse.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/util/parse.go b/weed/util/parse.go
index 0955db682..502f3a80f 100644
--- a/weed/util/parse.go
+++ b/weed/util/parse.go
@@ -61,3 +61,8 @@ func ParseHostPort(hostPort string) (filerServer string, filerPort int64, err er
return
}
+
+func CanonicalizeETag(etag string) string {
+ canonicalETag := strings.TrimPrefix(etag, "\"")
+ return strings.TrimSuffix(canonicalETag, "\"")
+}