utils

package
v0.0.1-0...-29cb976 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Byte     uint64 = 1
	KibiByte        = 1024 * Byte
	MebiByte        = 1024 * KibiByte
	GibiByte        = 1024 * MebiByte
	TebiByte        = 1024 * GibiByte
	PebiByte        = 1024 * TebiByte
)

Variables

This section is empty.

Functions

func RandString

func RandString(n int, charSet ...CharSet) string

func StringsContain

func StringsContain(s []string, substr string) bool

StringsContain reports whether substr is within s.

Types

type CharSet

type CharSet string
const (
	NumberSet      CharSet = "0123456789"
	LowerCharSet   CharSet = "abcdefghijklmnopqrstuvwxyz"
	UpperCharSet   CharSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	SpecialCharSet CharSet = "~!@#$%^&*_+-=<>?"
	AllCharSet     CharSet = LowerCharSet + UpperCharSet + SpecialCharSet + NumberSet
)

Jump to

Keyboard shortcuts

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