File: utils.go

package info (click to toggle)
golang-github-fasthttp-router 1.5.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 284 kB
  • sloc: makefile: 3
file content (10 lines) | stat: -rw-r--r-- 196 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
package router

import "strings"

func validatePath(path string) {
	switch {
	case len(path) == 0 || !strings.HasPrefix(path, "/"):
		panic("path must begin with '/' in path '" + path + "'")
	}
}