File: util.go

package info (click to toggle)
golang-github-go-openapi-runtime 0.23.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports
  • size: 940 kB
  • sloc: sh: 9; makefile: 4
file content (12 lines) | stat: -rw-r--r-- 255 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
package denco

// NextSeparator returns an index of next separator in path.
func NextSeparator(path string, start int) int {
	for start < len(path) {
		if c := path[start]; c == '/' || c == TerminationCharacter {
			break
		}
		start++
	}
	return start
}