randomize

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package randomize has helpers for randomization of structs and fields

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Struct

func Struct(s *Seed, str interface{}, colTypes map[string]string, canBeNull bool, blacklist ...string) error

Struct gets its fields filled with random data based on the seed. It will ignore the fields in the blacklist. It will ignore fields that have the struct tag boil:"-"

Types

type Seed

type Seed int64

Seed is an atomic counter for pseudo-randomization structs. Using full randomization leads to collisions in a domain where uniqueness is an important factor.

func NewSeed

func NewSeed() *Seed

NewSeed creates a new seed for pseudo-randomization.

Jump to

Keyboard shortcuts

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