home: github.com/shurcooL/home/internal/mod Index | Files

package mod

import "github.com/shurcooL/home/internal/mod"

Package mod exposes select functionality related to module mechanics. Its code is mostly copied from cmd/go/internal/... packages.


Package Files


func HashZip Uses

func HashZip(b []byte, hash dirhash.Hash) (string, error)

HashZip is like dirhash.HashZip, but the .zip file it takes can be in memory rather than on disk.

func ParseV000PseudoVersion Uses

func ParseV000PseudoVersion(v string) (_ time.Time, rev string, err error)

ParseV000PseudoVersion returns the time stamp and the revision identifier of the v0.0.0 pseudo-version v. It returns an error if v is not a valid v0.0.0 pseudo-version of the form "v0.0.0-yyyymmddhhmmss-abcdef123456".

func PseudoVersion Uses

func PseudoVersion(major, older string, t time.Time, rev string) string

PseudoVersion returns a pseudo-version for the given major version ("v1") preexisting older tagged version ("" or "v1.2.3" or "v1.2.3-pre"), revision time, and revision identifier (usually a 12-byte commit hash prefix).

type RevInfo Uses

type RevInfo struct {
    Version string    // version string
    Time    time.Time // commit time

A RevInfo describes a single revision in a module repository.

Package mod imports 8 packages (graph) and is imported by 2 packages. Updated 2019-12-16. Refresh now. Tools for package owners.