mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-11 08:12:26 +08:00
fix: fix some go line issue in go report card
This commit is contained in:
@@ -410,15 +410,15 @@ func Drop(slice interface{}, n int) interface{} {
|
||||
res.Index(i).Set(sv.Index(i + n))
|
||||
}
|
||||
|
||||
return res.Interface()
|
||||
} else {
|
||||
res := reflect.MakeSlice(sv.Type(), svLen+n, svLen+n)
|
||||
for i := 0; i < res.Len(); i++ {
|
||||
res.Index(i).Set(sv.Index(i))
|
||||
}
|
||||
|
||||
return res.Interface()
|
||||
}
|
||||
|
||||
res := reflect.MakeSlice(sv.Type(), svLen+n, svLen+n)
|
||||
for i := 0; i < res.Len(); i++ {
|
||||
res.Index(i).Set(sv.Index(i))
|
||||
}
|
||||
|
||||
return res.Interface()
|
||||
}
|
||||
|
||||
// InsertByIndex insert the element into slice at index.
|
||||
|
||||
Reference in New Issue
Block a user