Move ParseQuery from ffmpeg to streams module

This commit is contained in:
Alexey Khit
2023-05-06 14:29:35 +03:00
parent 4fe078c7c0
commit 3139189975
2 changed files with 20 additions and 14 deletions
+19
View File
@@ -0,0 +1,19 @@
package streams
import (
"net/url"
"strings"
)
func ParseQuery(s string) url.Values {
params := url.Values{}
for _, key := range strings.Split(s, "#") {
var value string
i := strings.IndexByte(key, '=')
if i > 0 {
key, value = key[:i], key[i+1:]
}
params[key] = append(params[key], value)
}
return params
}