git

package
v0.8.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeURL added in v0.5.2

func NormalizeURL(repo string) string

NormalizeURL normalizes Git URLs of the following forms:

  • http[s]://[proxy-user:proxy-pass@]host.xz[:port][/path/to/repo[.git][/]]
  • ssh://[user@]host.xz[:port][/path/to/repo[.git][/]]
  • [user@]host.xz[:path/to/repo[.git][/]]

This is useful for the purposes of comparison and also in cases where a canonical representation of a Git URL is needed. Any URL that cannot be normalized will be returned as-is.

Types

This section is empty.

Jump to

Keyboard shortcuts

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