uri

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 2 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

Overview

Package uri is goav's one URL handling for what it reports and reads: the scheme a value names, names without credentials, URLs with their secrets replaced, and source text with its secrets masked in place.

Index

Constants

View Source
const Marker = "REDACTED"

Marker replaces a redacted secret.

Variables

This section is empty.

Functions

func Mask

func Mask(text string) string

Mask overwrites, byte for byte, the userinfo and secret query values of every URL in text, so a source excerpt keeps its columns.

func Redact

func Redact(u *url.URL) (name, full string)

Redact renders u for reports: name is scheme://host/path with no userinfo, query, or fragment; full keeps the query with secret values replaced and userinfo as Marker.

func Scheme

func Scheme(raw string) string

Scheme returns the lower-case scheme raw names, or "" for a path: a value whose prefix before ":" is not an RFC 3986 scheme of two or more letters (a Windows drive letter is one) names a file, whatever else it contains.

func Secret

func Secret(name string) bool

Secret reports a query parameter that may carry a credential. Matching errs wide: a redacted harmless value costs nothing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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