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 {
|
func (self Max) Match(s string) bool {
|
||||||
var l int
|
var l int
|
||||||
for range s {
|
for _ = range s {
|
||||||
l += 1
|
l += 1
|
||||||
if l > self.Limit {
|
if l > self.Limit {
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -15,7 +15,7 @@ func NewMin(l int) Min {
|
||||||
|
|
||||||
func (self Min) Match(s string) bool {
|
func (self Min) Match(s string) bool {
|
||||||
var l int
|
var l int
|
||||||
for range s {
|
for _ = range s {
|
||||||
l += 1
|
l += 1
|
||||||
if l >= self.Limit {
|
if l >= self.Limit {
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -43,7 +43,7 @@ func (self Row) matchAll(s string) bool {
|
||||||
|
|
||||||
func (self Row) lenOk(s string) bool {
|
func (self Row) lenOk(s string) bool {
|
||||||
var i int
|
var i int
|
||||||
for range s {
|
for _ = range s {
|
||||||
i++
|
i++
|
||||||
if i >= self.RunesLength {
|
if i >= self.RunesLength {
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue