added main routine for go apps

This commit is contained in:
Kevin Fries 2024-08-16 21:32:22 -06:00
parent f3fbfa6e36
commit ce86a23622

30
main.go Normal file
View File

@ -0,0 +1,30 @@
package main
import (
"fmt"
. "git.kevinfries.com/kfries63/config"
. "git.kevinfries.com/kfries63/logger"
}
func init() {
SetAppName("Hello World", "hw")
SetAppVersion("0.1.0")
DefineConfigItem("Debug", "D", false, "Trun on debug mode")
SetLogger(Debug)
}
func DebugHandler() {
if Config.GetBool("Debug") {
SetLogger(Debug)
}
}
func main*() {
GetConfigs()
DebugHandler()
fmt.Println("Hello World!!")
}