util

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDebugEnabled

func IsDebugEnabled() (bool, string)

Types

type ContextAware added in v0.1.0

type ContextAware interface {
	Context() context.Context
}

type DefaultURLComparer added in v0.1.0

type DefaultURLComparer struct{}

DefaultURLComparer is the default implementation of URLComparer.

func (DefaultURLComparer) EqualStrings added in v0.1.0

func (c DefaultURLComparer) EqualStrings(a, b string) (bool, error)

EqualStrings parses and compares two URL strings.

func (DefaultURLComparer) EqualURLs added in v0.1.0

func (c DefaultURLComparer) EqualURLs(a, b *url.URL) bool

EqualURLs compares two url.URL instances for equality after normalization.

type URLComparer added in v0.1.0

type URLComparer interface {
	// EqualStrings compares two URL strings after parsing and normalization.
	EqualStrings(a, b string) (bool, error)
	// EqualURLs compares two url.URL instances after normalization.
	EqualURLs(a, b *url.URL) bool
}

URLComparer defines methods to safely compare URL strings and url.URL instances.

func NewURLComparer added in v0.1.0

func NewURLComparer() URLComparer

NewURLComparer returns a new DefaultURLComparer.

Jump to

Keyboard shortcuts

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