gitaddr

package
v0.1.5106 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 1 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 gitaddr reads the user part of a git address, so what magpie keeps of one (the library's library.json, the plugin host's plugins.json and bun's package.json) never holds a token typed as its user name (#8178, #8194).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPassword

func HasPassword(addr string) bool

HasPassword is whether addr is an http(s) address with a password in its user part (https://me:ghp_…@host/…), which a caller refuses rather than leaves out: one typed with a password was meant to sign in with.

func WithoutUser

func WithoutUser(addr string) string

WithoutUser is addr without the user part of an http(s) address, the rest as written: https://ghp_…@host/group/repo is https://host/group/repo, git+https://ghp_…@host/x.git#v1 is git+https://host/x.git#v1, and ghp_…@host/group/repo typed without https:// is host/group/repo. A password goes with the user (HasPassword tells a caller that refuses one). git's credential helper signs in without either. An SSH address (ssh://git@…, git@host:path) keeps its user, and anything else is given back as it is.

Types

This section is empty.

Jump to

Keyboard shortcuts

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