Documentation
¶
Overview ¶
Used for debug output. Switch to false if we release. This could also be done by a makefile using different source codes (see https://groups.google.com/d/msg/golang-nuts/gU7oQGoCkmg/xlVJx-OJ9EUJ )
Index ¶
- Constants
- Variables
- func D(tag Tag, format string, args ...interface{})
- func E(tag Tag, format string, args ...interface{}) int64
- func GetRequest(r *http.Request) interface{}
- func I(tag Tag, format string, args ...interface{}) int64
- func V(tag Tag, format string, args ...interface{})
- func W(tag Tag, format string, args ...interface{}) int64
- func WTF(tag Tag, format string, args ...interface{}) int64
- type Tag
Constants ¶
const KBLU = "\x1B[34m"
const KCYN = "\x1B[36m"
const KFNT = "\x1B[2m"
Faint (decreased intensity, not widely supported)
const KGRN = "\x1B[32m"
const KMAG = "\x1B[35m"
const KNRM = "\x1B[0m"
normal
const KRED = "\x1B[31m"
Other colors
const KRESET = "\033[0m"
const KWHT = "\x1B[37m"
const KYEL = "\x1B[33m"
Variables ¶
var Debugging debug = true
var Debugging can be set in production without any security risks, it enables debugging log-output.
var Develop = true
var Develop SHOULD NEVER EVER be set in Prod, it is used to disable security-relevant features in the using library
Functions ¶
func GetRequest ¶
func GetRequest prints a http-Request, if we are in develop the full request, otherwise only Method & url without parameters
func I ¶
func I prints a info message - will be in production mode, e.g. for registration finished, map uploaded etc.
func V ¶
func V prints a verbose message - development only (importance below debug, e.g. for big variable prints)