Merge branch v2.11 into v3.0
This commit is contained in:
commit
6ca4c5da5c
20 changed files with 220 additions and 217 deletions
|
@ -124,7 +124,7 @@ func hostSNIRegexp(tree *matchersTree, templates ...string) error {
|
|||
|
||||
// isASCII checks if the given string contains only ASCII characters.
|
||||
func isASCII(s string) bool {
|
||||
for i := 0; i < len(s); i++ {
|
||||
for i := range len(s) {
|
||||
if s[i] >= utf8.RuneSelf {
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ func varGroupName(idx int) string {
|
|||
func braceIndices(s string) ([]int, error) {
|
||||
var level, idx int
|
||||
var idxs []int
|
||||
for i := 0; i < len(s); i++ {
|
||||
for i := range len(s) {
|
||||
switch s[i] {
|
||||
case '{':
|
||||
if level++; level == 1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue