populatetest

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package populatetest fills reflect values with non-zero samples derived from their types. Only tests import it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NonZero

func NonZero(v reflect.Value, tag string) bool

NonZero fills v with a value distinguishable from the zero value, derived from v's type. String samples include the tag, so a value traces back to the field it was built for. It reports false for a kind it cannot build.

func NonZeroScale added in v1.32.0

func NonZeroScale(v reflect.Value, tag string, scale uint64) bool

NonZeroScale is NonZero with the numeric sample set to scale, so two calls with different scales produce ordered values for numeric kinds. Non-numeric kinds ignore the scale.

Types

This section is empty.

Jump to

Keyboard shortcuts

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