go.bigb.es/curator
Index
- func Info(repoPath string, rv *git.ResolvedVersion, modulePath string) ([]byte, string, error)
- func Mod(repoPath string, rv *git.ResolvedVersion, modulePath string) ([]byte, string, error)
- func Zip(repoPath string, rv *git.ResolvedVersion, modulePath string) ([]byte, string, error)
- type Origin
- type RevInfo
Functions
func Info(repoPath string, rv *git.ResolvedVersion, modulePath string) ([]byte, string, error)
func Mod(repoPath string, rv *git.ResolvedVersion, modulePath string) ([]byte, string, error)
Mod builds a go.mod response. Falls back to a synthetic go.mod if none exists.
func Zip(repoPath string, rv *git.ResolvedVersion, modulePath string) ([]byte, string, error)
Zip builds a module zip archive. Works with both bare and non-bare git repos by reading files directly via git commands.
Types
type Origin struct { VCS string `json:"VCS,omitempty"` URL string `json:"URL,omitempty"` Hash string `json:"Hash,omitempty"` Ref string `json:"Ref,omitempty"` }
Origin describes the provenance of a module version.
Info builds a JSON .info response for the given version.