mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
对新增函数 添加注释
This commit is contained in:
parent
eee0484894
commit
2e5f33fb08
1
main.go
1
main.go
@ -535,6 +535,7 @@ func getConfig() *global.JSONConfig {
|
||||
return conf
|
||||
}
|
||||
|
||||
// help cli命令行-h的帮助提示
|
||||
func help() {
|
||||
fmt.Printf(`go-cqhttp service
|
||||
version: %s
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user