gohttp/util.go

16 lines
177 B
Go
Raw Normal View History

2023-12-08 22:02:36 +08:00
package main
import (
"os"
"path/filepath"
)
func GetExecDir() string {
execPath, err := os.Executable()
if err != nil {
panic(err)
}
return filepath.Dir(execPath)
}