Initial commit, valiwork as framework is ready to use.
This commit is contained in:
25
debug.go
Normal file
25
debug.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package valiwork
|
||||
|
||||
import (
|
||||
// stdlib
|
||||
"os"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
var (
|
||||
DEBUG bool
|
||||
)
|
||||
|
||||
// Initializes debug output.
|
||||
// nolint
|
||||
func init() {
|
||||
debug, found := os.LookupEnv("VALIWORK_DEBUG")
|
||||
if found {
|
||||
debugBool, err := strconv.ParseBool(debug)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
DEBUG = debugBool
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user