File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,15 @@ func real(c ComplexType) FloatType
227
227
// the type of c.
228
228
func imag (c ComplexType ) FloatType
229
229
230
+ // The clear built-in function clears maps and slices.
231
+ // For maps, clear deletes all entries, resulting in an empty map.
232
+ // For slices, clear sets all elements up to the length of the slice
233
+ // to the zero value of the respective element type. If the argument
234
+ // type is a type parameter, the type parameter's type set must
235
+ // contain only map or slice types, and clear performs the operation
236
+ // implied by the type argument.
237
+ func clear [T ~ []Type | ~ map [Type ]Type1 ](t T )
238
+
230
239
// The close built-in function closes a channel, which must be either
231
240
// bidirectional or send-only. It should be executed only by the sender,
232
241
// never the receiver, and has the effect of shutting down the channel after
You can’t perform that action at this time.
0 commit comments