utils

package
v0.0.0-...-aea9ec1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandBase64String

func RandBase64String(bytesLen int) (string, error)

RandBase64String The final length is not the byte length, but the base64-encoded length.

func RandStringWithPrefix

func RandStringWithPrefix(prefix string, l int) (string, error)

RandStringWithPrefix .

func StringsInclude

func StringsInclude(slice []string, s string) bool

StringsInclude returns true or false if given string is in slice.

func StringsIndexOf

func StringsIndexOf(slice []string, s string) int

StringsIndexOf returns index position in slice from given string If value is -1, the string does not found.

func StringsUniqueAppend

func StringsUniqueAppend(slice []string, str ...string) []string

StringsUniqueAppend appends a string if not exist in the slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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