File: utils.go

package info (click to toggle)
golang-github-koofr-go-httpclient 0.0~git20190818.e0dc8fd-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 160 kB
  • sloc: makefile: 2
file content (14 lines) | stat: -rw-r--r-- 179 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package httpclient

import (
	"net/url"
	"strings"
)

func EscapePath(path string) string {
	u := url.URL{
		Path: path,
	}

	return strings.Replace(u.String(), "+", "%2b", -1)
}