代码:http.HandleFunc("/", api.Index)http.HandleFunc("/list", api.FileList)http.HandleFunc("/api/upload", api.UploadFile)http.HandleFunc("/api/delete", api.DeleteFile)http.Handle("/files", http.StripPrefix("/files/", http.FileServer(http.Dir(settings.FilesPath))))http.ListenAndServe(":1234", nil)结果1:http://localhost:1234/http://localhost:1234/listhttp://localhost:1234/文件匹配 ”/”api.index(第二个和第三个都错了)结果 2:http://localhost:1234/api/上传http://localhost:1234/api/delete匹配“/api/xxx”api.xxx(没错)环境:去 1.13.5 windows/amd64我应该怎么做才能解决这个问题?
- 1 回答
- 0 关注
- 218 浏览
添加回答
举报
0/150
提交
取消
