Help us shape the future of Go! Take the 2026 Go Developer Survey

internal

package
v0.20.5 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeURL

func NormalizeURL(u *url.URL)

NormalizeURL will normalize the specified URL This was added to replace a previous call to the no longer maintained purell library: The call that was used looked like the following:

url.Parse(purell.NormalizeURL(parsed, purell.FlagsSafe|purell.FlagRemoveDuplicateSlashes))

To explain all that was included in the call above, purell.FlagsSafe was really just the following:

  • FlagLowercaseScheme
  • FlagLowercaseHost
  • FlagRemoveDefaultPort
  • FlagRemoveDuplicateSlashes (and this was mixed in with the |)

This also normalizes the URL into its urlencoded form by removing RawPath and RawFragment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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