package gitfs
import "golang.org/x/build/internal/gitfs"
Package gitfs presents a file tree downloaded from a remote Git repo as an in-memory fs.FS.
Index ¶
Types ¶
type Hash ¶
type Hash [20]byte
A Hash is a SHA-1 Hash identifying a particular Git object.
func (Hash) String ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
A Repo is a connection to a remote repository served over HTTP or HTTPS.
func NewRepo ¶
NewRepo connects to a Git repository at the given http:// or https:// URL.
func (*Repo) Clone ¶
Clone resolves the given ref to a hash and returns the corresponding fs.FS.
func (*Repo) CloneHash ¶
CloneHash returns the fs.FS for the given hash.
func (*Repo) Resolve ¶
Resolve looks up the given ref and returns the corresponding Hash.
Source Files ¶
doc.go gitfs.go
- Version
- v0.0.0-20250421191922-3619c213cff3 (latest)
- Published
- Apr 21, 2025
- Platform
- linux/amd64
- Imports
- 15 packages
- Last checked
- 3 months ago –
Tools for package owners.