From 2a0694d2fa577574b505c4635eb8a824eaf88ddc Mon Sep 17 00:00:00 2001 From: Shulhan Date: Thu, 23 Jan 2025 03:40:50 +0700 Subject: all: use for-range with numeric Go 1.22 now support for-range on numeric value. --- lib/strings/parser_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/strings/parser_test.go') diff --git a/lib/strings/parser_test.go b/lib/strings/parser_test.go index adc4baa6..dca30c63 100644 --- a/lib/strings/parser_test.go +++ b/lib/strings/parser_test.go @@ -1,6 +1,6 @@ -// Copyright 2019, Shulhan . All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// SPDX-FileCopyrightText: 2019 M. Shulhan +// +// SPDX-License-Identifier: BSD-3-Clause package strings @@ -70,7 +70,7 @@ b`, for _, c := range cases { p.Load(c.content, "\n") - for x := 0; x < len(c.exp); x++ { + for x := range len(c.exp) { gotLine, gotC := p.Line() test.Assert(t, ``, c.exp[x].line, gotLine) test.Assert(t, ``, c.exp[x].c, gotC) -- cgit v1.3-5-g9baa