strings

package
v2.451.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 3 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 well-known operational endpoints such as health and metrics routes that are typically ignored by auth, limiter, and logging middleware.

Start with `IsIgnorable`.

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 IsIgnorable

func IsIgnorable(path string) bool

IsIgnorable reports whether path should be treated as ignorable by HTTP middleware.

Matching is exact by path segment so only well-known operational endpoints such as `/<service>/healthz` or `/<service>/metrics` are ignored.

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