strings

package
v2.321.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 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 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 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