The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
d0m2o08

巨佬,这个 main.go 中没看到 executor 是怎么初始化的呢

  •  
  •   d0m2o08 · Jul 29, 2024 · 1182 views
    This topic created in 677 days ago, the information mentioned may be changed or developed.

    MetaCubeX/mihomo 这个开源项目,Alpha 分支的 main.go 中,只是引入了"gayhub/metacubex/mihomo/hub/executor"这个包,而且在 executor.go 这个文件中也没看到有 init 方法。

    而在 main.go 中直接就调用了 executor.ApplyConfig 和 executor.Shutdown 方法,

    求巨佬指点一下 executor 这个东西是咋初始化出来的😭

    zuiwu
        1
    zuiwu  
       Jul 29, 2024
    你好歹贴个代码 main 文件目录链接啊,啥也没有谁会再自己去搜索帮你看
    iyaozhen
        2
    iyaozhen  
       Jul 29, 2024
    他又不是个类 class ,为啥要初始化?
    fgwmlhdkkkw
        3
    fgwmlhdkkkw  
       Jul 29, 2024 via Android
    全局搜下 init
    Constellation39
        4
    Constellation39  
       Jul 29, 2024
    hub/executor/executor.go
    ```
    package executor
    func ApplyConfig(cfg *config.Config, force bool) {}
    func Shutdown() {}
    ```
    基础语法详见 https://go.dev/doc/
    d0m2o08
        5
    d0m2o08  
    OP
       Jul 29, 2024
    d0m2o08
        6
    d0m2o08  
    OP
       Jul 29, 2024
    @iyaozhen 原来是这样,我找错方向了,多谢大佬
    vx7298
        7
    vx7298  
       Jul 29, 2024
    是不看看 listenser ,,config 哪里有,ReCreateTun ,这个吧
    d0m2o08
        8
    d0m2o08  
    OP
       Jul 29, 2024
    @vx7298 好的好的,有点眉目了😁
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2743 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 02:17 · PVG 10:17 · LAX 19:17 · JFK 22:17
    ♥ Do have faith in what you're doing.