func (self *Dbgr) getEmit() _emit {
	if self.emit == nil {
		self.emit = standardEmit()
	}
	return self.emit
}
Idiot-proof &Dbgr{}, etc.
package dbg
import (
	"bytes"
	"fmt"
	"io"
	"log"
	"os"
	"regexp"
	"runtime"
	"strings"
	"unicode"
)
type _frmt struct {
	ctl          string
	format       string
	operandCount int
	panic        bool
	fatal        bool
	check        bool
}
var (
	ctlTest = regexp.MustCompile(`^\s*%/`)
	ctlScan = regexp.MustCompile(`%?/(panic|fatal|check)(?:\s|$)`)
)
func operandCount(format string) int {
	count := 0
	end := len(format)
	for at := 0; at < end; {
		for at < end && format[at] != '%' {
			at++
		}
		at++
		if at < end {
			if format[at] != '%' && format[at] != '@' {
				count++
			}
			at++
		}
	}
	return count
}
func parseFormat(format string) (frmt _frmt) {
	if ctlTest.MatchString(format) {
		format = strings.TrimLeftFunc(format, unicode.IsSpace)
		index := strings.Index(format, "//")
		if index != -1 {
			frmt.ctl = format[0:index]
			format = format[index+2:]  
		} else {
			frmt.ctl = format
			format = ""
		}
		for _, tmp := range ctlScan.FindAllStringSubmatch(frmt.ctl, -1) {
			for _, value := range tmp[1:] {
				switch value {
				case "panic":
					frmt.panic = true
				case "fatal":
					frmt.fatal = true
				case "check":
					frmt.check = true
				}
			}
		}
	}
	frmt.format = format
	frmt.operandCount = operandCount(format)
	return
}
type Dbgr struct {
	emit _emit
}
type DbgFunction func(values ...interface{})
func NewDbgr() *Dbgr {
	self := &Dbgr{}
	return self
}
func New(options ...interface{}) (dbg DbgFunction, dbgf DbgFunction) {
	dbgr := NewDbgr()
	if len(options) > 0 {
		if fn, ok := options[0].(func(*Dbgr)); ok {
			fn(dbgr)
		}
	}
	return dbgr.DbgDbgf()
}
func (self Dbgr) Dbg(values ...interface{}) {
	self.getEmit().emit(_frmt{}, "", values...)
}
func (self Dbgr) Dbgf(values ...interface{}) {
	self.dbgf(values...)
}
func (self Dbgr) DbgDbgf() (dbg DbgFunction, dbgf DbgFunction) {
	dbg = func(vl ...interface{}) {
		self.Dbg(vl...)
	}
	dbgf = func(vl ...interface{}) {
		self.dbgf(vl...)
	}
	return dbg, dbgf  
}
func (self Dbgr) dbgf(values ...interface{}) {
	var frmt _frmt
	if len(values) > 0 {
		tmp := fmt.Sprint(values[0])
		frmt = parseFormat(tmp)
		values = values[1:]
	}
	buffer_f := bytes.Buffer{}
	format := frmt.format
	end := len(format)
	for at := 0; at < end; {
		last := at
		for at < end && format[at] != '%' {
			at++
		}
		if at > last {
			buffer_f.WriteString(format[last:at])
		}
		if at >= end {
			break
		}
		at++
		if format[at] == '@' {
			depth := 2
			pc, _, _, _ := runtime.Caller(depth)
			name := runtime.FuncForPC(pc).Name()
			buffer_f.WriteString(name)
		} else {
			buffer_f.WriteString(format[at-1 : at+1])
		}
		at++
	}
	values_f := values[0:frmt.operandCount]
	values_dbg := values[frmt.operandCount:]
	if len(values_dbg) > 0 {
		{
			tmp := format
			if len(tmp) > 0 {
				if unicode.IsSpace(rune(tmp[len(tmp)-1])) {
					buffer_f.WriteString("%v")
				} else {
					buffer_f.WriteString(" %v")
				}
			} else if frmt.check {
			} else {
				buffer_f.WriteString("%v")
			}
		}
		if !frmt.check {
			tmp := []string{}
			for _, value := range values_dbg {
				tmp = append(tmp, fmt.Sprintf("%v", value))
			}
			values_f = append([]interface{}{}, values_f...)
			values_f = append(values_f, strings.Join(tmp, " "))
		}
	}
	format = buffer_f.String()
	if frmt.check {
		for _, value := range values_dbg {
			if value != nil {
				if format == "" {
					panic(value)
				} else {
					panic(fmt.Sprintf(format, append(values_f, value)...))
				}
			}
		}
	} else {
		self.getEmit().emit(frmt, format, values_f...)
	}
}