Random string and int generator for Go programming

Hello i want to share my Go package, ill love to read your
commentaries .

https://github.com/saturnavt/random

random

Random string and int generator for Go programming

#Installation

  1. Get the package
$ go get github.com/saturnavt/random
  1. Import it in your code:
import "github.com/saturnavt/random"

#Quick start

Random String

package main

import (
  "fmt"
  "github.com/saturnavt/random"
)

func main() {
  fmt.Println(random.RandomString(12)) //Change 12 for your own string length, output example 'rlJlGUgEpLnE'
}

random Integer

package main

import (
  "fmt"
  "github.com/saturnavt/random"
)

func main() {
  fmt.Println(random.RandomNumber(80, 0)) //80 is the maximun number and 0 the minimun number,change for your own max and minimun, output example '25'
}

Good job, but it would be better keep arguments in natural order i.e. (min, max). And of course proper formatting (go fmt).

1 Like

Thanks, ill do that tomorrow, you can also contribute on github if you want, ;p