Merge branch 'master' into master

This commit is contained in:
thinkerou 2021-01-12 00:04:50 +08:00 committed by GitHub
commit e798d156c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -14,6 +14,7 @@ import (
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"sync"
"testing"
"time"
@ -146,7 +147,7 @@ func TestRunWithPort(t *testing.T) {
func TestUnixSocket(t *testing.T) {
router := New()
unixTestSocket := "/tmp/unix_unit_test"
unixTestSocket := filepath.Join(os.TempDir(), "unix_unit_test")
defer os.Remove(unixTestSocket)

View File

@ -63,7 +63,7 @@ func SetMode(value string) {
case TestMode:
ginMode = testCode
default:
panic("gin mode unknown: " + value)
panic("gin mode unknown: " + value + " (available mode: debug release test)")
}
modeName = value