Skip to content

Commit af5aff9

Browse files
committed
Merge pull request #19 from syscrusher/fix-tango-stdout
Prevent Tango from writing to stdout
2 parents d373aca + 27cc99a commit af5aff9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

routers.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package main
77
import (
88
"fmt"
99
"io"
10+
"io/ioutil"
1011
"log"
1112
"net/http"
1213
"os"
@@ -909,15 +910,15 @@ func initTango() {
909910
}
910911

911912
func loadTango(routes []route) http.Handler {
912-
tg := tango.New()
913+
tg := tango.NewWithLog(tango.NewLogger(ioutil.Discard))
913914
for _, route := range routes {
914915
tg.Route([]string{route.method}, route.path, tangoHandler)
915916
}
916917
return tg
917918
}
918919

919920
func loadTangoSingle(method, path string, handler func(*tango.Context)) http.Handler {
920-
tg := tango.New()
921+
tg := tango.NewWithLog(tango.NewLogger(ioutil.Discard))
921922
tg.Route([]string{method}, path, handler)
922923
return tg
923924
}

0 commit comments

Comments
 (0)