utility

package
v0.0.0-...-2fa33bc Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "v0.0.0"
	GitUrl    = "https://github.com/xmapst/taskflow.git"
	GitBranch = "main"
	GitCommit string
	BuildTime string
	UserName  = "xmapst"
	UserEmail = "xmapst@gmail.com"
)

Functions

func BridgeXExpHandler

func BridgeXExpHandler(handler slog.Handler) xlog.Handler

BridgeXExpHandler 把标准库的 handler 包成 x/exp/slog 的 handler, 供已经持有 *xlog.Logger 的场合替换其下游。

func BridgeXExpLogger

func BridgeXExpLogger(handler slog.Handler) *xlog.Logger

BridgeXExpLogger 把标准库的 handler 包成 x/exp/slog 的 logger。

func CheckDuplicate

func CheckDuplicate[T comparable](slice []T) []T

func DefaultDir

func DefaultDir(name string) string

func EnsureDirExist

func EnsureDirExist(name string) error

func FileOrPathExist

func FileOrPathExist(filename string) bool

func PrintHeadInfo

func PrintHeadInfo()

func RemoveDuplicate

func RemoveDuplicate[T comparable](slice []T) []T

func StartSelfUpdate

func StartSelfUpdate(uri string, skipFunc func() bool)

StartSelfUpdate checks for releases every 30 minutes and skips replacement while skipFunc reports that the service is busy.

func VersionInfo

func VersionInfo() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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