forked from mirror/glob
Merge pull request #8 from calmh/go13
use range constructs that build on Go 1.3
This commit is contained in:
commit
d877f63521
|
@ -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