projecturl

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package projecturl names repositories by the canonical identity of design §13.1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canonical

func Canonical(raw string) (string, error)

Canonical removes transport credentials and transport-specific spelling. It refuses local paths and SSH aliases whose identity needs user confirmation. Errors deliberately never quote input: a remote may contain a password.

func Redact

func Redact(raw string) string

Redact returns raw with anything that may be a credential removed, for errors and logs about a URL: the userinfo (everything up to the last '@', so a password holding '/' or ':' goes too, and so does a token standing alone) and any query or fragment.

func RedactText

func RedactText(s string) string

RedactText replaces any userinfo in the URLs a text quotes with ***: git mostly redacts credentials itself, but the runner and the plan mirror quote URLs and git output in their errors, and one leak through a job record or a log is one too many. A user:password pair goes, and so does a lone token (https://<token>@host, ssh://<token>@host) in a URL of any scheme, as does an http(s) URL's query or fragment. A scp-like git@host:path stays: its user is a login name, not a secret.

Types

This section is empty.

Jump to

Keyboard shortcuts

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