1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

对新增函数 添加注释

This commit is contained in:
scjtqs 2021-03-10 21:10:43 +08:00
parent eee0484894
commit 2e5f33fb08
2 changed files with 4 additions and 0 deletions

View File

@ -535,6 +535,7 @@ func getConfig() *global.JSONConfig {
return conf
}
// help cli命令行-h的帮助提示
func help() {
fmt.Printf(`go-cqhttp service
version: %s

View File

@ -13,6 +13,7 @@ import (
"strings"
)
// Daemon go-cqhttp server 的 daemon的实现函数
func Daemon() {
args := os.Args[1:]
@ -44,10 +45,12 @@ func Daemon() {
os.Exit(0)
}
// savePid 保存pid到文件中便于后续restart/stop的时候kill pid用。
func savePid(path string,data string) error {
return global.WriteAllText(path, data)
}
// GetCurrentPath 预留,获取当前目录地址
func GetCurrentPath() (string, error) {
file, err := exec.LookPath(os.Args[0])
if err != nil {