transport

package
v0.0.0-...-68956d0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package transport centralizes HTTPS/SSH URL classification so every consumer (mapper, probe, clone-from, reclone, scan) shares one rule set. Replaces the historically-duplicated `classifyTransport` in gitmap/mapper and `looksLikeSCP` in gitmap/clonefrom (#15 of the post-v6.53.0 improvements list).

The buckets match `constants.ScanTransport*` so existing consumers can switch over without renaming values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Classify

func Classify(url string) string

Classify returns one of the three stable transport buckets: constants.ScanTransportSSH, ScanTransportHTTPS, ScanTransportOther. Whitespace-only URLs are treated as "other" so downstream column-count invariants stay intact.

func IsSCPStyle

func IsSCPStyle(url string) bool

IsSCPStyle reports whether `url` is the `[user@]host:path` form that git accepts as an SSH remote (e.g. `git@github.com:o/r.git`).

Types

This section is empty.

Jump to

Keyboard shortcuts

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