git

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFile

func GetFile(gitURL, commit, path string) ([]byte, error)

GetFile fetches a file from a git repository at a specific commit. Works with GitHub and GitLab repositories.

func GetLatestCommit

func GetLatestCommit(gitURL string) (string, error)

GetLatestCommit returns the latest commit hash from a git URL.

Trims the commit hash to 10 characters.

func ListFiles

func ListFiles(gitURL, commit string) ([]string, error)

ListFiles returns a list of files at the root of a git repository at a specific commit. Uses the GitHub/GitLab API to list directory contents.

Types

This section is empty.

Jump to

Keyboard shortcuts

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