1
0
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:
dudaodong
2022-01-03 14:57:14 +08:00
parent 9266d99249
commit 7a9b0847f9
4 changed files with 12 additions and 13 deletions

View File

@@ -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.