Documentation ¶ Overview ¶ Package sliceclear provides a way to clear and truncate the length of a slice. Index ¶ func Clear[Slice ~[]E, E any](s Slice) Slice Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Clear ¶ func Clear[Slice ~[]E, E any](s Slice) Slice Clear zeroes out all values in s and returns s[:0]. Clear allows memory of previous elements in the slice to be reclained by the garbage collector while still allowing the underlying slice memory to be reused. Types ¶ This section is empty. Source Files ¶ View all Source files sliceclear.go Click to show internal directories. Click to hide internal directories.