feat: update route generate

This commit is contained in:
Rogee
2025-01-15 10:44:07 +08:00
parent 915e7cb2f7
commit 1e03cf6038
3 changed files with 23 additions and 13 deletions

View File

@@ -53,6 +53,8 @@ func positionFromString(v string) Position {
return PositionCookie
case "local":
return PositionLocal
case "file":
return PositionFile
}
panic("invalid position: " + v)
}
@@ -64,6 +66,7 @@ const (
PositionHeader Position = "header"
PositionCookie Position = "cookie"
PositionLocal Position = "local"
PositionFile Position = "file"
)
func ParseFile(file string) []RouteDefinition {