route

command
v0.0.0-...-231bdf8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

Route

You can learn about how to use hertz route:

  • static route
  • route group
  • use middleware with route group
  • parameter route
  • use anonymous function or decorator to register routes
  • route info

parameter route:

Parameters such as ':name' are called named parameters, and named parameters only match a single path segment

Pattern: /hertz/:version

 /hertz/v0                  match
 /hertz/v1                  match
 /hertz/v1/profile          no match
 /hertz/                    no match

Parameters such as '*action' are called wildcard parameters and they match everything. Therefore, they must be located at the end of the pattern

Pattern: /src/*filepath

 /src/                     match
 /src/somefile.go          match
 /src/subdir/somefile.go   match

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL