Compare commits

..

No commits in common. "main" and "v0.1.0" have entirely different histories.
main ... v0.1.0

5 changed files with 5 additions and 10 deletions

View file

@ -28,7 +28,7 @@ _Zouter_ is an HTTP router library for Zig **zap** HTTP server. It's made to eas
## Versions
Zouter 0.1.1 is made for zig 0.13.0 and tested with zap 0.8.0.
Zouter 0.1.0 is made for zig 0.13.0 and tested with zap 0.8.0.
## How to use
@ -37,7 +37,7 @@ Zouter 0.1.1 is made for zig 0.13.0 and tested with zap 0.8.0.
In your project directory:
```shell
$ zig fetch --save https://code.zeptotech.net/zedd/zouter/archive/v0.1.1.tar.gz
$ zig fetch --save https://code.zeptotech.net/zedd/zouter/archive/v0.1.0.tar.gz
```
In `build.zig`:

View file

@ -1,6 +1,6 @@
.{
.name = "zouter",
.version = "0.1.1",
.version = "0.1.0",
.minimum_zig_version = "0.13.0",
.dependencies = .{
@ -14,7 +14,5 @@
"build.zig",
"build.zig.zon",
"src",
"README.md",
"LICENSE",
},
}

View file

@ -1,3 +1,4 @@
const std = @import("std");
const router = @import("router.zig");
const route = @import("route.zig");

View file

@ -195,8 +195,6 @@ pub const RouteNode = struct {
.handle = definition.handle,
.handleNotFound = definition.handleNotFound,
.handleError = definition.handleError,
.preHandle = definition.preHandle,
.postHandle = definition.postHandle,
});
}
else
@ -205,8 +203,6 @@ pub const RouteNode = struct {
childTree.handle = definition.handle;
childTree.handleNotFound = definition.handleNotFound;
childTree.handleError = definition.handleError;
childTree.preHandle = definition.preHandle;
childTree.postHandle = definition.postHandle;
if (definition.children) |children|
{ // If there are children, recursively parse them.

View file

@ -1,5 +1,5 @@
const std = @import("std");
const zouter = @import("zouter");
const zouter = @import("../src/root.zig");
test {
// try std.testing.refAllDecls(zouter);