use range constructs that build on Go 1.3

This commit is contained in:
Jakob Borg 2016-04-03 11:41:14 +02:00
parent a3f5513f64
commit 347f51cd34
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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