Add 1.21.30

This commit is contained in:
AkmalFairuz
2025-01-01 05:00:42 +07:00
parent a8442c7a2a
commit 45cfb78b30
14 changed files with 7174 additions and 13 deletions

View File

@@ -51,3 +51,9 @@ func IsWriter(w protocol.IO) bool {
_, ok := w.(*Writer)
return ok
}
func EmptySlice[T any](io protocol.IO, slice *[]T) {
if IsReader(io) {
*slice = make([]T, 0)
}
}