function

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name    = "Skynet"
	Version = "v0.6.2"
	Path    = "github.com/yhyj/skynet"
)

程序信息

Variables

View Source
var Platform = runtime.GOOS

Functions

func FileExist added in v0.1.2

func FileExist(filePath string) bool

判断文件是否存在

func GetAbsPath added in v0.1.3

func GetAbsPath(filePath string) string

获取指定文件绝对路径

func GetCurrentUserInfo added in v0.4.1

func GetCurrentUserInfo() (*user.User, error)

获取当前用户信息

func GetHostname added in v0.4.1

func GetHostname() string

获取不在环境变量中的HOSTNAME

func GetNetInterfaces added in v0.1.3

func GetNetInterfaces() (map[int]map[string]string, error)

获取网卡信息(用于CLI版)

func GetNetInterfacesForGui added in v0.5.0

func GetNetInterfacesForGui() ([]string, error)

获取网卡信息(用于GUI版)

func GetUserInfoById added in v0.4.1

func GetUserInfoById(userId int) (*user.User, error)

根据ID获取用户信息

func GetUserInfoByName added in v0.4.1

func GetUserInfoByName(userName string) (*user.User, error)

根据用户名获取用户信息

func GetVariable added in v0.4.1

func GetVariable(key string) string

获取环境变量

func HttpServer added in v0.1.3

func HttpServer(address string, port string, dir string)

启动HTTP服务(用于CLI版)

func HttpServerForGui added in v0.5.0

func HttpServerForGui(address string, port string, dir string) (*http.Server, error)

启动HTTP服务(GUI使用)

func ProgramInfo

func ProgramInfo(only bool) string

func QrCodeImage added in v0.5.0

func QrCodeImage(content string) (image.Image, error)

生成二维码图片

func QrCodeString added in v0.5.0

func QrCodeString(content string) (string, error)

生成二维码字符串

func SetFont added in v0.5.0

func SetFont() error

为Fyne设置字体

func SetVariable added in v0.4.1

func SetVariable(key, value string) error

设置环境变量

func StartGraphicalUserInterface added in v0.5.0

func StartGraphicalUserInterface()

启动GUI

Types

This section is empty.

Jump to

Keyboard shortcuts

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