4
0
Fork 0
mirror of https://github.com/rocky-linux/peridot.git synced 2024-12-28 21:10:57 +00:00
peridot/vendor/github.com/go-openapi/runtime/middleware/denco/util.go

13 lines
255 B
Go
Raw Normal View History

2022-07-07 20:11:50 +00:00
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
}