mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-03 03:28:03 -05:00
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()
|
|
}
|