util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert[T any](val any) (T, bool)

func FindProjectRoot

func FindProjectRoot() string

func GetAttr

func GetAttr(o interface{}, attr string) interface{}

func GetMd5String

func GetMd5String(s string) string

GetMd5String Generate a 32-bit MD5 string

func HasAttr

func HasAttr(o interface{}, attr string) bool

func MergeUpdateSQL

func MergeUpdateSQL(sqlStr1, sqlStr2 string) (string, error)

func ReflectNew

func ReflectNew(target interface{}) interface{}

func SetAttr

func SetAttr(o interface{}, attr string, val interface{}) bool

func UniqueID

func UniqueID() string

UniqueID Generate UID string The generated string is largely unique, but absolute uniqueness cannot be guaranteed.

Types

type Config

type Config = map[string]any

func GetConfig

func GetConfig() *Config

Jump to

Keyboard shortcuts

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