mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
build: use strings.CutPrefix introduced in go1.20
This commit is contained in:
@@ -6247,8 +6247,8 @@ func (o *Object) downloadFromURL(ctx context.Context, bucketPath string, options
|
||||
metaData := make(map[string]string)
|
||||
for key, value := range resp.Header {
|
||||
key = strings.ToLower(key)
|
||||
if strings.HasPrefix(key, "x-amz-meta-") {
|
||||
metaKey := strings.TrimPrefix(key, "x-amz-meta-")
|
||||
if after, ok := strings.CutPrefix(key, "x-amz-meta-"); ok {
|
||||
metaKey := after
|
||||
metaData[metaKey] = value[0]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user