mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-24 08:46:54 +08:00
refactor and fix strings.Split
This commit is contained in:
@@ -3,6 +3,7 @@ package s3api
|
||||
import (
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
@@ -43,7 +44,7 @@ func FromTags(tags map[string]string) (t *Tagging) {
|
||||
|
||||
func parseTagsHeader(tags string) (map[string]string, error) {
|
||||
parsedTags := make(map[string]string)
|
||||
for _, v := range strings.Split(tags, "&") {
|
||||
for _, v := range util.StringSplit(tags, "&") {
|
||||
tag := strings.Split(v, "=")
|
||||
if len(tag) == 2 {
|
||||
parsedTags[tag[0]] = tag[1]
|
||||
|
||||
Reference in New Issue
Block a user