utils

package
v0.0.0-...-defef51 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStructFieldName

func GetStructFieldName(sf reflect.StructField, tagType ...string) (fieldName string)

func HandleMethod

func HandleMethod(methods []string) error

func InArray

func InArray[T comparable](val T, list []T) bool

InArray Is it in the array

func ParseBool

func ParseBool(i interface{}) (rs bool, err error)

ParseBool Parse bool type

func ParseFloat64

func ParseFloat64(i interface{}) (rs float64, err error)

ParseFloat64 Parse float64 type

func ParseInt64

func ParseInt64(i interface{}) (rs int64, err error)

ParseInt64 Parse int64 type

func SplitUpper

func SplitUpper(s string) (string, string)

SplitUpper Cut based on the first non-zero uppercase letter

func ToBool

func ToBool(i interface{}) (rs bool)

ToBool 转成bool类型

func ToFloat64

func ToFloat64(i interface{}) (rs float64)

ToFloat64 Convert float64 type

func ToInt64

func ToInt64(i interface{}) (rs int64)

ToInt64 Convert int64 type

func ToPtr

func ToPtr[T any](v T) *T

func ToString

func ToString(i interface{}) string

ToString Convert string type

Types

This section is empty.

Jump to

Keyboard shortcuts

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