git

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: BSD-3-Clause Imports: 3 Imported by: ? 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 git provides helpers for recognizing and normalizing Git repository URLs across the schemes Git supports (scp-like git@, git, ssh, http, and https).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupportedRepositoryURL

func IsSupportedRepositoryURL(raw string) bool

IsSupportedRepositoryURL reports whether raw looks like a Git repository URL: an scp-like git@ address, or a git, ssh, http, or https URL with a host and a repository path.

func NormalizeForMatch

func NormalizeForMatch(raw string) string

NormalizeForMatch normalizes a repository URL for equality comparison by trimming whitespace and trailing slashes and dropping a .git suffix.

func RequiresRemoteProbe

func RequiresRemoteProbe(raw string) bool

RequiresRemoteProbe reports whether raw is an http or https URL that could be either a Git repository or something else, so only asking the remote can settle it. URLs that already end in .git, and non-HTTP schemes, never need a probe.

Types

This section is empty.

Jump to

Keyboard shortcuts

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