示例#1
0
文件: main.go 项目: HimanshPal/cnt
func main() {
	logs.GetDefaultLog().(*erlog.ErlogLogger).Appenders[0].(*erlog.ErlogWriterAppender).Out = os.Stdout
	logs.SetLevel(logs.TRACE)

	overrideEnvVarName := ""
	target := "/"
	var templateDir string

	processArgs(&overrideEnvVarName, &target, &templateDir)

	Run(overrideEnvVarName, target, templateDir)
}
示例#2
0
文件: main.go 项目: puckel/dgr
func main() {
	logs.GetDefaultLog().(*erlog.ErlogLogger).Appenders[0].(*erlog.ErlogWriterAppender).Out = os.Stdout

	if os.Getuid() != 0 {
		println("dgr needs to be run as root")
		os.Exit(1)
	}

	if !SupportsOverlay() {
		logs.Fatal("Overlay filesystem is required")
	}

	Execute()
}
示例#3
0
文件: main.go 项目: puckel/dgr
func main() {
	logs.GetDefaultLog().(*erlog.ErlogLogger).Appenders[0].(*erlog.ErlogWriterAppender).Out = os.Stdout

	overrideEnvVarName := ""
	target := "/"
	var templateDir string
	logLvl := "INFO"

	processArgs(&overrideEnvVarName, &target, &templateDir, &logLvl)

	lvl, err := logs.ParseLevel(logLvl)
	if err != nil {
		fmt.Println("Wrong log level : " + logLvl)
		os.Exit(1)
	}
	logs.SetLevel(lvl)

	Run(overrideEnvVarName, target, templateDir)
}
示例#4
0
文件: main.go 项目: blablacar/dgr
func main() {
	logs.GetDefaultLog().(*erlog.ErlogLogger).Appenders[0].(*erlog.ErlogWriterAppender).Out = os.Stdout

	uuid := ProcessArgsAndReturnPodUUID()

	dir, err := os.Getwd()
	if err != nil {
		logs.WithE(err).Fatal("Failed to get current working directory")
	}

	b, err := NewBuilder(dir, uuid)
	if err != nil {
		logs.WithE(err).Fatal("Failed to load Builder")
	}

	if err = b.Build(); err != nil {
		logs.WithE(err).Fatal("Build failed")
	}

	os.Exit(0)
}