mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-11 00:40:00 +08:00
feat: support embed file system to serve files in rest (#4253)
This commit is contained in:
@@ -44,7 +44,7 @@ func TestMiddleware(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
middleware := Middleware(tt.path, tt.dir)
|
||||
middleware := Middleware(tt.path, http.Dir(tt.dir))
|
||||
nextHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user