gen

package module
v0.0.0-...-fedaf7d Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2019 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

gen

easy random data(string/slice/map/int/etc) generator

install
  • go get github.com/asm-jaime/gen
example (how to use lib)
  • example main.go
package main

import(
  "fmt"
  "github.com/asm-jaime/gen"
)

func main() {
  fmt.Println(gen.Str(10))
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IAbs

func IAbs(n int) int

IAbs absolute value of n as a int number

func MinMax

func MinMax(min, max int) int

MinMax random num bentween min and max

func SliceRndGap

func SliceRndGap(len int, min int, max int) (res []int)

SliceRndGap return slice with random points in the interim gap if len = 3, result will be [0, 45, 100]

func Str

func Str(n int) string

Str string of length n as a array of runes

func StrNums

func StrNums(n int) string

StrNums string of length n as a number

func TokenB64

func TokenB64(n int) string

TokenB64 random string of length n as a base64 token

Types

This section is empty.

Jump to

Keyboard shortcuts

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