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)
|
|
|
|
}
|