Help us shape the future of Go! Take the 2026 Go Developer Survey

method

package
v1.16.21 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeMethod

func NormalizeMethod(method string) (string, error)

NormalizeMethod validates and cleans a service invocation method name. It rejects methods containing '#', '?', null bytes, or control characters (bytes 0x01-0x1f and 0x7f), then resolves path traversal via path.Clean. The caller is responsible for percent-decoding (for HTTP) before calling.

func ValidateName

func ValidateName(name string) error

ValidateName checks that a name (e.g. reminder or timer name) does not contain characters that could cause path traversal or injection when the name is embedded in a URL path. Unlike NormalizeMethod, this rejects any name containing '/' or '\' since names are identifiers, not paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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