forked from mirror/glob
use range constructs that build on Go 1.3
This commit is contained in:
parent
a3f5513f64
commit
347f51cd34
|
@ -15,7 +15,7 @@ func NewMax(l int) Max {
|
|||
|
||||
func (self Max) Match(s string) bool {
|
||||
var l int
|
||||
for range s {
|
||||
for _ = range s {
|
||||
l += 1
|
||||
if l > self.Limit {
|
||||
return false
|
||||
|
|
|
@ -15,7 +15,7 @@ func NewMin(l int) Min {
|
|||
|
||||
func (self Min) Match(s string) bool {
|
||||
var l int
|
||||
for range s {
|
||||
for _ = range s {
|
||||
l += 1
|
||||
if l >= self.Limit {
|
||||
return true
|
||||
|
|
|
@ -43,7 +43,7 @@ func (self Row) matchAll(s string) bool {
|
|||
|
||||
func (self Row) lenOk(s string) bool {
|
||||
var i int
|
||||
for range s {
|
||||
for _ = range s {
|
||||
i++
|
||||
if i >= self.RunesLength {
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue