📝 fix incorrect function comments (#16719)

This commit is contained in:
Jeffrey Chen 2025-12-29 15:52:01 +08:00 committed by GitHub
parent f7822b5b3e
commit 4132736037
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -63,7 +63,7 @@ func RandString(length int) string {
return string(b)
}
// InsertElem inserts value at index into a.
// InsertElem inserts value at index into s.
// 0 <= index <= len(s)
func InsertElem[T any](s []T, index int, value T) []T {
if len(s) == index { // nil or empty slice or after last element