INNER CODE UNIT · Go
main
alibaba/loongcollector · tools/builder/main.go:42
func main() {
flag.Parse()
goModContent, err := os.ReadFile(filepath.Join(*projectRoot, "go.mod"))
if err != nil {
fmt.Println("failed to read go.mod in project root:", *projectRoot)
os.Exit(1)
}
files := strings.Split(*configFile, ",")
if *configFile == "" || len(files) == 0 {
fmt.Println("no plugins config found")
return
}
conf := &pluginConfig{}
for _, file := range files {
file = getAbsPath(file, *projectRoot)
if _, err = os.Stat(file); err != nil {