Skip to content

Traversing subdirectories #16

@daenney

Description

@daenney

First off, thanks for legit, it's rather neat!

I was looking at how to make it support traversing subdirectories and so far I have the necessary infrastructure in place that would let me do this, including being able to limit the recursion depth.

The problem I'm running into is flow and its URL path handling:

mux.HandleFunc("/:name", d.Multiplex, "GET", "POST")

Unsurprisingly, /:name only captures a single segment. But when you have subdirectories you need either /:parent/:name or /:name. If I can assume there's only max 1 parent this can be solved without much trouble. But if there's a desire to allow for an arbitrary path depth it becomes problematic as the wildcard ... can only be used once and only at the end of a path. I'm not sure how to consume multiple path segments.

I'm wondering if you've given any thought around how to solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions