We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e977d12 + 9607761 commit e80eb9bCopy full SHA for e80eb9b
fastglue.go
@@ -241,6 +241,11 @@ func (f *Fastglue) Any(path string, h FastRequestHandler) {
241
f.Router.DELETE(path, f.handler(h))
242
}
243
244
+// NotFound is fastglue's wrapper over fasthttprouter's `router.NotFound` handler.
245
+func (f *Fastglue) NotFound(h FastRequestHandler) {
246
+ f.Router.NotFound = f.handler(h)
247
+}
248
+
249
// ServeStatic serves static files under `rootPath` on `path` urls.
250
// The `path` must end with "/{filepath:*}", files are then served from the local
251
// path /defined/root/dir/{filepath:*}. For example `path` can be
0 commit comments