fusen-render/main/main.go

30 lines
401 B
Go
Raw Permalink Normal View History

2023-08-16 03:42:49 +00:00
package main
import (
"flag"
"fmt"
"fusenrender"
2023-08-16 05:16:27 +00:00
"log"
2023-08-16 03:42:49 +00:00
)
var configEnv string
func init() {
2023-08-16 05:16:27 +00:00
log.SetFlags(log.Llongfile)
2023-08-16 03:42:49 +00:00
flag.StringVar(&configEnv, "etc", "a", "配置环境(etc文件)")
}
func main() {
flag.Parse()
configFile := fmt.Sprintf("../etc/etc_%s.yaml", configEnv)
svc, err := fusenrender.LoadConfig(configFile)
if err != nil {
panic(err)
}
fusenrender.StartNode(svc)
}