mod

package
v0.0.0-...-c858694 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT, BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashZip

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

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

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).

Types

type RevInfo

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

A RevInfo describes a single revision in a module repository.

Jump to

Keyboard shortcuts

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