[agent-go] 完成日志框架部分

This commit is contained in:
zeaslity
2023-03-20 15:55:27 +08:00
parent 4961a4ddc7
commit e1d7dd45fd
7 changed files with 226 additions and 0 deletions

View File

@@ -1,5 +1,20 @@
package main
import (
"agent-go/config"
"flag"
"fmt"
)
func main() {
// 解析命令行参数
var version string
flag.StringVar(&version, "version", "", "config file version")
flag.Parse()
// 读取对应版本的配置文件
filename := fmt.Sprintf("octopus-agent-%s.yaml", version)
// 初始化Nacos的连接配置
config.InitNacos(filename)
}