added main routine for go apps
This commit is contained in:
parent
f3fbfa6e36
commit
ce86a23622
30
main.go
Normal file
30
main.go
Normal 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!!")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user