pkgutils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExceName

func ExceName() string

ExceName 获取当前可执行文件的名称

func ExecPath

func ExecPath() string

ExecPath 获取当前可执行文件的路径

Types

type Result

type Result[T any] struct {
	Success bool    `json:"success"`
	Message *string `json:"message,omitempty"`
	Data    *T      `json:"data,omitempty"`
}

func Failed

func Failed[T any](msg string, data T) Result[T]

func FailedData

func FailedData[T any](data T) Result[T]

func FailedMsg

func FailedMsg(msg string) Result[types.Nil]

func Success

func Success[T any](msg string, data T) Result[T]

func SuccessData

func SuccessData[T any](data T) Result[T]

func SuccessMsg

func SuccessMsg(msg string) Result[types.Nil]

Jump to

Keyboard shortcuts

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