utils

package
v0.0.0-...-d80f745 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes2String

func Bytes2String(s []byte) string

func GetLocalIP

func GetLocalIP() (string, error)

func Must

func Must(err error)

func Must1

func Must1[T any](v T, err error) T

func Must2

func Must2[T any, P any](v1 T, v2 P, err error) (T, P)

func MustGetHostname

func MustGetHostname() string

func MustGetLocalIP

func MustGetLocalIP() string

func RandomByte

func RandomByte(size int) []byte

func RandomPass

func RandomPass(size int) string

生成长度为size的随机密码

func RandomString

func RandomString(size int) string

生成长度为size的随机字符串

func SecureRandomString

func SecureRandomString(size int) (s string, err error)

func StringToBytes

func StringToBytes(s string) []byte

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