Chance

January 1, 2019 ยท View on GitHub

Chance is a random generator in Go

Build Status Go Report Card Codecov GoDoc GitHub license

Instal

go get -u github.com/nasermirzaei89/chance

Usage

Sample

package main

import (
    "fmt"
    "time"

    "github.com/nasermirzaei89/chance"
)

func main() {
    ch := chance.New(chance.SetSeed(time.Now().UnixNano()))
    fmt.Println(ch.Bool())
    fmt.Println(ch.String())
    fmt.Println(ch.Int())
    fmt.Println(ch.Byte())
    fmt.Println(ch.Rune())
}

Documentation

https://godoc.org/github.com/nasermirzaei89/chance

Contents

  1. 1Instal
  2. 2Usage
  3. 2.1Sample
  4. 3Documentation