utils

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

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

Go to latest
Published: Feb 12, 2023 License: BSD-3-Clause Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneArray

func CloneArray[T any](a []T, extra ...T) []T

CloneArray will create copy of input array

func JoinString

func JoinString(sep string, args ...string) string

func MaskString

func MaskString(s string, sensitive MaskLevel) string

func Must

func Must(err error)

Must will panic if error occurred.

func MustR

func MustR[K interface{}](input K, err error) K

MustR will panic if error occurred; otherwise, return input value

func TrimString

func TrimString(str string, limit int) string

func VersionNumber

func VersionNumber(version string) float64

Support version string `v0.0.1` `v0.1.0` `v1.0.0` `v1.2.3` `v1.2.3-beta.1` `v1.2.3-alpha.1` `v1.2.3-rc.1`

Types

type MaskLevel

type MaskLevel int
const (
	NONE MaskLevel = iota
	LOW
	MEDIUM
	HIGH
)

Jump to

Keyboard shortcuts

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