randomstring

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

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

Go to latest
Published: Sep 23, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

README

random string

A golang library for generate a random string lowercases, string uppercase and numbers. Util for unix-like shell scripting.

Usage

Return a string of 32 characters.

./randstr
GAPkKnVFRICHskSCDxeTFTknIIsQBbdd

Cases:

  • Default (length of this string: 32 letters, upper and lowercases):
./randstr
UDckrRnCvURNRuKvNWziyRIBxREtjaEQ
  • Another cases:
./randstr -lu 35
WIMVngPABZGiBHcCuhmDLTVcoBAHrdJJUGH

./randstr -l 35
sgjxwcoqnkkqogzotoigozvyjdmzsegixul

./randstr -u 35
IBZDSTKGTFQSUWIICQSOTUBBNYISCIAWOYC

./randstr -nl 30
en8usol16pe8e6fhwy5c8xz7d5v9sr

./randstr -nu 32
DYCA7VFE1AURUI66PZGISG7IHQ8707HX

./randstr -n 20
46495882363454181740

./randstr -v
0.1.3

Warning

    On most GNU/Linux file systems, filenames can be up to 255 characters long, 
	this is the most portable character set [-._A-Za-z0-9] 

Version

If you use the argument -v or version return this:

./randstr -v
0.1.3

Usage example

mkdir $(randstr -l 27)
cp /home/user/file.xyz /home/user/$(randstr -u 45)
mv /home/user/file.xyz $(randstr -l 17)

License

GPLv3.0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenRandStr

func GenRandStr(s string, lenStr int) string

func GetRandomCharacter

func GetRandomCharacter(s string) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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