joist/internal/routing/route_info.go
2025-09-06 23:53:58 -04:00

27 lines
490 B
Go

package routing
type RouteInfo struct {
Method string
Name string
Path string
Description string
Title string
}
func NewRouteInfo(method, path, description, title string) (*RouteInfo, error) {
name, err := convertRouteToRouteName(path)
if err != nil {
return &RouteInfo{}, err
}
return &RouteInfo{
Method: method,
Name: name,
Path: path,
Description: description,
Title: title,
}, nil
}
type routeInfoKey struct{}