31 lines
466 B
Go
31 lines
466 B
Go
|
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!!")
|
||
|
}
|
||
|
|