zero

package
v0.0.0-...-30c4c12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package zero provides facilities for efficiently zeroing Go values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Slice

func Slice(v interface{})

Slice zeroes the elements 0 <= i < v.Len() of the provided slice. Slice panics if the value is not a slice. f

func SliceValue

func SliceValue(v reflect.Value)

SliceValue zeroes the elements 0 <= i < v.Len() of the provided slice value. Slice panics if the value is not a slice. f

func Unsafe

func Unsafe(t reflect.Type, ptr unsafe.Pointer, n int)

Unsafe zeroes n elements starting at the address ptr. Elements must be of type t.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL