
MetaCubeX/mihomo 这个开源项目,Alpha 分支的 main.go 中,只是引入了"gayhub/metacubex/mihomo/hub/executor"这个包,而且在 executor.go 这个文件中也没看到有 init 方法。
而在 main.go 中直接就调用了 executor.ApplyConfig 和 executor.Shutdown 方法,
求巨佬指点一下 executor 这个东西是咋初始化出来的
1 zuiwu 2024-07-29 15:00:12 +08:00 你好歹贴个代码 main 文件目录链接啊,啥也没有谁会再自己去搜索帮你看 |
2 iyaozhen 2024-07-29 15:02:27 +08:00 他又不是个类 class ,为啥要初始化? |
3 fgwmlhdkkkw 2024-07-29 15:03:51 +08:00 via Android 全局搜下 init |
4 Constellation39 2024-07-29 15:04:42 +08:00 hub/executor/executor.go ``` package executor func ApplyConfig(cfg *config.Config, force bool) {} func Shutdown() {} ``` 基础语法详见 https://go.dev/doc/ |
5 d0m2o08 OP |
7 vx7298 2024-07-29 15:09:13 +08:00 是不看看 listenser ,,config 哪里有,ReCreateTun ,这个吧 |