filelist

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package filelist provides utilities to build file lists from directories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromDir

func FromDir(dir string) ([]string, error)

FromDir walks the provided directory and returns a list of files relative to dir. Directories themselves are not included.

func FromGitRepo

func FromGitRepo(dir string, repo *git.Repository, diff bool, target string) ([]string, error)

FromGitRepo returns a list of repository files relative to dir. If diff is true and target is empty, it returns uncommitted changes. If both diff and target are set, it returns changes compared to the target reference. If neither is set, it returns all tracked files. An error is returned for invalid combinations.

func GetGitRepo

func GetGitRepo(dir string) (*git.Repository, error)

GetGitRepo opens a git repository rooted at dir (or its parents when .git is detected) and returns the repository handle or a wrapped error with context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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