func main() { runtime.GOMAXPROCS(runtime.NumCPU()) logger := log.New(os.Stdout, "[tango] ", log.Ldefault()) t := tango.Classic(logger) t.Use(tpongo2.New()) t.Get("/json", new(JsonAction)) t.Get("/pongo", new(PongoAction)) t.Get("/string", new(StringAction)) t.Run(":8001") }
func NewLogger(out io.Writer) Logger { l := log.New(out, "[tango] ", log.Ldefault()) l.SetOutputLevel(log.Ldebug) return l }