Hi All,

Go 1.21 introduces a new clear() builtin function. I see this text in
https://tip.golang.org/ref/spec#Clear:

clear(t) type parameter see below

If the argument type is a type parameter
<https://tip.golang.org/ref/spec#Type_parameter_declarations>, all types in
its type set must be maps or slices, and clear performs the operation
corresponding to the actual type argument.

I am not able to make sense of it. What does this mean? Any examples on the
usage?

Appreciate your help.

Thanks
dharani

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAN-HoCn99D-m71aJr3DRzCJvk_c7h8OhG2O4wPC-1Wd2ruEYNg%40mail.gmail.com.

Reply via email to