util

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayStringToString

func ArrayStringToString(arr []string, delimiter string) string

ArrayStringToString function used to convert array string to string

func CheckSubnet

func CheckSubnet(ip, subnet string) bool

func TernaryEqualString

func TernaryEqualString(currentValue, expressionValue, defaultVal string) string

TernaryEqualInt checks if currentValue is equal to expressionValue, if true, return currentValue, else return defaultVal

func ToArrayInt32

func ToArrayInt32(v interface{}) []int32

ToArrayInt32 converts any value to []int32

func ToArrayInt64

func ToArrayInt64(v interface{}) []int64

ToArrayInt64 converts any value to []int64

func ToArrayInt8

func ToArrayInt8(v interface{}) []int8

ToArrayInt8 converts any value to []int8

func ToArrayString

func ToArrayString(v interface{}) []string

ToArrayString converts any value to []string

func ToBool

func ToBool(v interface{}) bool

ToBool convert any value to boolean.

func ToFloat64

func ToFloat64(v interface{}) float64

ToFloat64 convert any value to float64.

func ToInt

func ToInt(v interface{}) int

ToInt converts any value to int

func ToInt32

func ToInt32(v interface{}) int32

ToInt32 converts any value to int32

func ToInt64

func ToInt64(v interface{}) int64

ToInt64 converts any value to int64

func ToInt8

func ToInt8(v interface{}) int8

ToInt8 converts any value to int8

func ToStr

func ToStr(v interface{}) string

ToStr converts any value to string.

func ToTime

func ToTime(v interface{}) time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

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