sourcealiases

package
v0.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

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