From 5abb539bd0bd60c14fe61cd27648d6ef8d3e7857 Mon Sep 17 00:00:00 2001 From: kercylan98 Date: Tue, 23 May 2023 14:17:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E5=BC=82=E5=B8=B8=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/slice/slice.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/utils/slice/slice.go b/utils/slice/slice.go index a961d3c..c805468 100644 --- a/utils/slice/slice.go +++ b/utils/slice/slice.go @@ -3,11 +3,6 @@ package slice // Del 删除特定索引的元素 func Del[V any](slice *[]V, index int) { s := *slice - if index < 0 { - index = 0 - } else if index >= len(*slice) { - index = len(*slice) - 1 - } *slice = append(s[:index], s[index+1:]...) }