Explorar o código

Using test mode

Manu Mtz-Almeida %!s(int64=11) %!d(string=hai) anos
pai
achega
94f2f3f7eb
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      gin_test.go

+ 4 - 0
gin_test.go

@@ -10,6 +10,10 @@ import (
 	"testing"
 )
 
+func init() {
+	SetMode(TestMode)
+}
+
 func PerformRequest(r http.Handler, method, path string) *httptest.ResponseRecorder {
 	req, _ := http.NewRequest(method, path, nil)
 	w := httptest.NewRecorder()