github.com/sagernet/sing@v0.4.0-beta.19.0.20240518125136-f67a0988a636/common/clear.go (about) 1 //go:build go1.21 2 3 package common 4 5 func ClearArray[T ~[]E, E any](t T) { 6 clear(t) 7 } 8 9 func ClearMap[T ~map[K]V, K comparable, V any](t T) { 10 clear(t) 11 }