代码:
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:
匹配 ”/”
api.index(第二个和第三个是错误的)
结果2:
匹配“/api/xxx”
api.xxx(没错)
环境:
转到 1.13.5 窗口/amd64
我应该怎么做才能解决这个问题?
喵喔喔
相关分类