sourcealiases

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: GPL-3.0 Imports: 7 Imported by: 1 module, 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 sourcealiases preserves source-repository URLs in materialized trees without importing a rendering engine or a Git SDK.

Index

Constants

View Source
const FileName = ".fmp-source-repo-urls"

Variables

This section is empty.

Functions

func Discover

func Discover(ctx context.Context, path string) (map[string]struct{}, error)

Discover combines captured aliases and current Git remotes. Callers enforcing local-only reads must validate captured paths and avoid unrestricted Git discovery.

func NormalizeGitURL

func NormalizeGitURL(raw string) (string, bool)

NormalizeGitURL matches network repository identities across HTTPS and SSH URL forms. Local paths and file URLs are deliberately not remote aliases.

func Read

func Read(path string) []string

Read returns aliases already captured in a materialized source tree.

func WriteSourceRepoURLs

func WriteSourceRepoURLs(path, repoRoot string) error

WriteSourceRepoURLs writes remote aliases into a materialized tree.

func WriteSourceRepoURLsContext

func WriteSourceRepoURLsContext(ctx context.Context, path, repoRoot string) error

WriteSourceRepoURLsContext honors cancellation during Git discovery. Sources outside a Git repository have no aliases.

Types

This section is empty.

Jump to

Keyboard shortcuts

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