peridot/vendor/github.com/go-openapi/runtime/middleware/denco/util.go
2022-07-07 22:13:21 +02:00

12 lines
255 B
Go

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
}