remote

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package remote resolves remote sources (git URLs, registry packages) to local directories for scanning.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Keep  bool   // don't delete temp dir after scanning
	Depth int    // git clone depth (0 = full clone, -1 or unset = default shallow)
	Dir   string // directory to clone into (empty = temp dir)
}

Options configures remote source resolution.

type Source

type Source struct {
	Dir     string // local directory to scan
	Cleanup func() // call when done (removes temp dir unless --keep)
	Origin  string // original URL or package identifier
}

Source describes where a remote project came from.

func Resolve

func Resolve(ctx context.Context, source string, opts Options) (*Source, error)

Resolve takes a source string and returns a local directory to scan. Handles:

Jump to

Keyboard shortcuts

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