package
Version:
v0.0.0-...-c280332
Opens a new window with list of versions in this module.
Published: Oct 4, 2024
License: GPL-3.0
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
GetExecutableName 返回当前执行文件的名称
GetLocalIP 返回本地机器的内网IPv4地址
InitBase 解析参数并检测
如果在 windows 下双击打开了程序,程序将在此函数释出脚本后终止;
如果传入 -h 参数,程序将打印帮助后终止;
如果传入 -d 参数,程序将在启动 daemon 后终止。
func NoMoreDoubleClick() error
NoMoreDoubleClick 提示用户不要双击运行,并生成安全启动脚本
func RestartApplication()
RestartApplication 封装了应用程序的重启逻辑
func RunningByDoubleClick() bool
RunningByDoubleClick 检查是否通过双击直接运行
SetTitle sets the window title to "Gensokyo © 2023 - [Year] Hoshinonyaruko".
type Restarter interface {
Restart(executableName string) error
}
Restarter is the interface that wraps the Restart method.
type UnixRestarter struct{}
UnixRestarter implements the Restarter interface for Unix-like systems.
NewRestarter creates a new Restarter appropriate for Unix-like systems.
Restart restarts the application on Unix-like systems.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.