util

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 4 Imported by: 0

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