Skip to content

How to read a path param with echo that can contain slashes? #2617

@archit-harness

Description

@archit-harness

Issue Description

Consider following example -

package main

import (
    "github.com/labstack/echo"
)
func main() {
    e := echo.New()

    e.Get("/:repo/:image/manifests/:reference", func(e *echo.Context) error {
        return nil
    })

    e.Run(":8080")
}

now i want the image field to contains slashes and be able to query 3 different path params, which are - repo, image and reference and only image can contain slashes.

How should i write my route?

Checklist

  • Dependencies installed
  • No typos
  • Searched existing issues and docs

Expected behaviour

Actual behaviour

Steps to reproduce

Working code to debug

package main

func main() {
}

Version/commit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions