Documentation ¶
Index ¶
- Constants
- Variables
- func AbbreviateArray[T any](arr []T) string
- func AssertHere(a ...interface{})
- func Combinations[T any](arr []T, m int) [][]T
- func CompressJson(js string) (string, error)
- func ContainsInt64(array []int64, val int64) int
- func ContainsInterface(array []interface{}, val interface{}) int
- func ContainsString(array []string, val string) int
- func ConvertSlice[T any, R any](s []T, f func(T) R) []R
- func CopyField(dst any, src any, fields ...string)
- func CutUTF8(str string, start int, end int, suffix string) string
- func Exit()
- func False(cond bool, a ...interface{})
- func FalseF(cond bool, format string, a ...interface{})
- func FormatDate() string
- func FormatDateTime() string
- func FormatTime() string
- func FormatTimeStamp(ts int64) string
- func FormatTimeStampMilliWithFormat(ts int64, format string) string
- func FormatTimeStampWithFormat(ts int64, format string) string
- func GetCPUUsage() float64
- func GetDiskPartitionUsedPercent() map[string]float64
- func GetDiskPartitions() []string
- func GetFileInfoOfCaller(skip int) (string, string, int)
- func GetFullNameOfPointer(i any) string
- func GetLocalIP() (string, error)
- func GetMEMUsage() float64
- func GetNotNil[T comparable](s ...T) T
- func GetShortFuncName(long string) string
- func GetShortNameOfPointer(i any) string
- func GetUpTime() uint64
- func GetWebPageTitle(url string) (string, error)
- func IsProcessAlive(pid int) bool
- func PathExists(path string) (bool, error)
- func PrettyPrintJson(js string, indent string) (string, error)
- func ReadLine(filename string, handle func(string) error) error
- func RegisterAtExit(handler func())
- func RemoveAnyFromSlice(src []interface{}, elem interface{}) []interface{}
- func RemoveItemFromSlice[T comparable](src []T, elem T) []T
- func SetChildrenProcessDetached(c *exec.Cmd)
- func SetChildrenProcessGroupID(c *exec.Cmd)
- func SplitAndTrimSpace(s string, sep string) []string
- func True(cond bool, a ...interface{})
- func TrueF(cond bool, format string, a ...interface{})
- func WriteFile(filename string, data []byte, perm fs.FileMode) error
- type CallFrame
- type Map
- type MapSlice
- type Queue
- type QueueTraversalHandle
- type SQLite
- func (db *SQLite) Begin() (*SQLiteTX, error)
- func (db *SQLite) Close() error
- func (db *SQLite) Exec(query string, args ...interface{}) (int64, int64, error)
- func (db *SQLite) GetTableRowCount(table string) (int64, error)
- func (db *SQLite) ListTables() ([]string, error)
- func (db *SQLite) Open(dbName string) error
- func (db *SQLite) Query(handle ScanHandle, query string, args ...interface{}) error
- type SQLiteTX
- type ScanHandle
- type ScheJob
- type Scheduler
- type Set
- type SignalHandler
- type SignalSet
- type TableModel
Constants ¶
View Source
const ( DateTimeFormat = "2006-01-02 15:04:05" TimeFormat = "15:04:05" DateFormat = "2006-01-02" )
Variables ¶
View Source
var ( CurCaller = 1 DefaultSkipCaller = 2 DefaultMaxCaller = 15 )
View Source
var (
InvalidDBHandle = errors.New("invalid handle")
)
Functions ¶
func AbbreviateArray ¶
func AssertHere ¶
func AssertHere(a ...interface{})
func Combinations ¶
func CompressJson ¶
func ContainsInt64 ¶
func ContainsInterface ¶
func ContainsInterface(array []interface{}, val interface{}) int
func ContainsString ¶
func ConvertSlice ¶
func FormatDate ¶
func FormatDate() string
func FormatDateTime ¶
func FormatDateTime() string
func FormatTime ¶
func FormatTime() string
func FormatTimeStamp ¶
func GetCPUUsage ¶
func GetCPUUsage() float64
func GetDiskPartitions ¶
func GetDiskPartitions() []string
func GetFullNameOfPointer ¶
func GetLocalIP ¶
func GetMEMUsage ¶
func GetMEMUsage() float64
func GetNotNil ¶
func GetNotNil[T comparable](s ...T) T
func GetShortFuncName ¶
func GetShortNameOfPointer ¶
func GetWebPageTitle ¶
func IsProcessAlive ¶
func PathExists ¶
func RegisterAtExit ¶
func RegisterAtExit(handler func())
func RemoveAnyFromSlice ¶
func RemoveAnyFromSlice(src []interface{}, elem interface{}) []interface{}
func RemoveItemFromSlice ¶
func RemoveItemFromSlice[T comparable](src []T, elem T) []T
func SplitAndTrimSpace ¶
Types ¶
type Map ¶
type Map[T constraints.Ordered, V any] struct { Key T Value V }
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) SetCapacity ¶
func (*Queue) Traversal ¶
func (q *Queue) Traversal(handle QueueTraversalHandle)
type QueueTraversalHandle ¶
type QueueTraversalHandle func(interface{}) error
type SQLite ¶
type SQLite struct {
// contains filtered or unexported fields
}
func (*SQLite) ListTables ¶
type SQLiteTX ¶
type SQLiteTX struct {
// contains filtered or unexported fields
}
type ScanHandle ¶
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
var GlobalScheduler *Scheduler
func NewScheduler ¶
func NewScheduler() *Scheduler
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func (*Set) AsStringArray ¶
type SignalHandler ¶
type SignalSet ¶
type SignalSet struct {
// contains filtered or unexported fields
}
func NewSignalSet ¶
func NewSignalSet() *SignalSet
Source Files ¶
Click to show internal directories.
Click to hide internal directories.