File: uri_windows.go

package info (click to toggle)
golang-github-valyala-fasthttp 20160617-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 980 kB
  • sloc: makefile: 18
file content (12 lines) | stat: -rw-r--r-- 213 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
// +build windows

package fasthttp

func addLeadingSlash(dst, src []byte) []byte {
	// zero length and "C:/" case
	if len(src) == 0 || (len(src) > 2 && src[1] != ':') {
		dst = append(dst, '/')
	}

	return dst
}