mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
move url.URL into base.URL (#459)
This commit is contained in:
15
pkg/base/path.go
Normal file
15
pkg/base/path.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package base
|
||||
|
||||
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