routepath

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package routepath defines endpoint paths and route prefixes. Package routepath 定义端点路径和路由前缀。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(prefix, path string) string

Join combines a validated route prefix and endpoint path, preserving trailing slashes. Join 组合已校验的路由前缀和端点路径,保留尾斜线。

func Pattern

func Pattern(path string) (string, error)

Pattern validates a non-empty final path. Pattern 校验非空的最终路径。

func Validate

func Validate(path string) error

Validate checks a route path. A lone slash denotes a trailing-slash endpoint. Validate 检查路由路径;单独的斜线表示带尾斜线的端点。

func ValidatePrefix

func ValidatePrefix(prefix string) error

ValidatePrefix checks a route prefix. Empty means no prefix. ValidatePrefix 检查路由前缀;空字符串表示不添加前缀。

Types

This section is empty.

Jump to

Keyboard shortcuts

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