mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-24 21:18:19 -05:00
37f64eb0e8
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
13 lines
212 B
Go
13 lines
212 B
Go
package net
|
|
|
|
import (
|
|
"net/url"
|
|
)
|
|
|
|
// EncodePath encodes the path of a url.
|
|
//
|
|
// slashes (/) are treated as path-separators.
|
|
func EncodePath(path string) string {
|
|
return (&url.URL{Path: path}).EscapedPath()
|
|
}
|