Merge pull request #8 from calmh/go13

use range constructs that build on Go 1.3
This commit is contained in:
Sergey Kamardin 2016-04-13 22:37:43 +03:00
commit d877f63521
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