This CLI allows random string easyly from string set with given size.
To run this CLI go to releases and find the appropriate build from release page.
To run command first grab an executable from release.
~ rand-str --help # For help or rand-str -h
# Outputs
# usage: main <string_len> <string_set>
~ rand-str 6 # For random string of 6 characters
~ rand-str 9 "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" # For random string of 9 characters from "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" set
To run tests locally make sure
- Need Go 1.16
- Setup project or clone outside
GOPATH
to check rungo env GOPATH
To run test
go test -v -race ./...
To get test coverage
go test -v -race -coverprofile=/tmp/go-cover.`basename $(pwd)`.out -covermode=atomic ./... && go tool cover -func=/tmp/go-cover.`basename $(pwd)`.out && unlink /tmp/go-cover.`basename $(pwd)`.out
Or
go test -v -race -coverprofile=/tmp/go-cover.`basename $(pwd)`.out -covermode=atomic ./... && go tool cover -html=/tmp/go-cover.`basename $(pwd)`.out && unlink /tmp/go-cover.`basename $(pwd)`.out
First clone the repo then follow the Tests step.
go build
First clone the repo then follow the Tests step.
We use svu for automatic tagging and build of our repo using Github actions see svu commit message pattern for your commit message.