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" setTo run tests locally make sure
- Need Go 1.16
- Setup project or clone outside
GOPATHto 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)`.outOr
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)`.outFirst clone the repo then follow the Tests step.
go buildFirst 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.