mirror of
https://github.com/aler9/gortsplib
synced 2025-11-02 21:14:07 +08:00
move URL into dedicated folder
This commit is contained in:
15
pkg/url/path.go
Normal file
15
pkg/url/path.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package url
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// PathSplitQuery splits a path from a query.
|
||||
func PathSplitQuery(pathAndQuery string) (string, string) {
|
||||
i := strings.Index(pathAndQuery, "?")
|
||||
if i >= 0 {
|
||||
return pathAndQuery[:i], pathAndQuery[i+1:]
|
||||
}
|
||||
|
||||
return pathAndQuery, ""
|
||||
}
|
||||
Reference in New Issue
Block a user