mirror of
https://gitee.com/chuangxxt/share-copilot
synced 2026-12-01 22:27:53 +00:00
Initial commit
This commit is contained in:
@@ -156,6 +156,12 @@ func initConfig() Config {
|
||||
if err != nil {
|
||||
panic("file \"./config.json\" not found")
|
||||
}
|
||||
// 获取可执行文件所在目录
|
||||
exeDir := filepath.Dir(exePath)
|
||||
configFile, err := os.Open(exeDir + "/config.json")
|
||||
if err != nil {
|
||||
panic("file \"./config.json\" not found")
|
||||
}
|
||||
defer func(configFile *os.File) {
|
||||
err := configFile.Close()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user