strings

package
v2.486.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package strings provides HTTP-specific string helpers for net-layer middleware.

This package contains small helpers used by HTTP middleware and telemetry code, including matching service-owned operational endpoints such as health and metrics routes that are typically ignored by auth, limiter, and logging middleware.

Start with `IsOperationPath`.

Index

Constants

View Source
const (
	// Empty is an alias for strings.Empty.
	Empty = strings.Empty

	// Space is an alias for strings.Space.
	Space = strings.Space
)

Variables

This section is empty.

Functions

func Bytes

func Bytes(s string) []byte

Bytes is an alias for strings.Bytes.

func Concat

func Concat(ss ...string) string

Concat is an alias for strings.Concat.

func Contains

func Contains(s, substr string) bool

Contains is an alias for strings.Contains.

func Cut

func Cut(s, sep string) (string, string, bool)

Cut is an alias for strings.Cut.

func IsEmpty

func IsEmpty(s string) bool

IsEmpty is an alias for strings.IsEmpty.

func IsOperationPath added in v2.413.0

func IsOperationPath(name env.Name, path string) bool

IsOperationPath reports whether path is a service-owned operational endpoint.

Matching is exact so application routes such as "/admin/metrics" are not treated as transport operation endpoints for auth or rate-limit bypasses.

func Join

func Join(sep string, ss ...string) string

Join is an alias for strings.Join.

func ToLower

func ToLower(s string) string

ToLower is an alias for strings.ToLower.

Types

This section is empty.

Jump to

Keyboard shortcuts

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