util

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

The util package contains utilities for working with URL paths.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must[T any](v T, err error) T

func ShiftPath

func ShiftPath(raw string) (head, tail string)

ShiftPath splits off the first component of raw, which will be cleaned of relative components before processing. head will never contain a slash and tail will always be a rooted path without trailing slash.

See: https://blog.merovius.de/posts/2017-06-18-how-not-to-use-an-http-router/

func ValidateLength

func ValidateLength(str string, min, max int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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