From 9871bde9f1211645b71c47dc3f5386b297ae0410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Fri, 16 Aug 2024 23:54:48 +0800 Subject: [PATCH] chore: make lint happy --- helper/writer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helper/writer.go b/helper/writer.go index ef0450c..9c6a123 100644 --- a/helper/writer.go +++ b/helper/writer.go @@ -131,7 +131,7 @@ func (w *Writer) Skip(n int) (int, error) { } return 0, io.EOF } - n = min(n, len(b.buf[b.off:])) + n = minnum(n, len(b.buf[b.off:])) b.off += n if n > 0 { b.lastRead = opRead @@ -168,8 +168,8 @@ const ( opReadRune4 readOp = 4 // Read rune of size 4. ) -// min 返回两数最小值,该函数将被内联 -func min[T int | int8 | uint8 | int16 | uint16 | int32 | uint32 | int64 | uint64](a, b T) T { +// minnum 返回两数最小值,该函数将被内联 +func minnum[T int | int8 | uint8 | int16 | uint16 | int32 | uint32 | int64 | uint64](a, b T) T { if a > b { return b }