Skip to content

x/mod/module: move pseudo-version functions from cmd/go/internal/modfetch #44969

@jayconrod

Description

@jayconrod

These functions in modfetch are used to handle pseudo-versions in the Go command. They're not tied to anything else in the go command and could be moved out into x/mod/module without much trouble.

func IsPseudoVersion(v string) bool
func IsZeroPseudoVersion(v string) bool
func PseudoVersion(major, older string, t time.Time, rev string) string
func PseudoVersionBase(v string) (string, error)
func PseudoVersionRev(v string) (rev string, err error)
func PseudoVersionTime(v string) (time.Time, error)
func ZeroPseudoVersion(major string) string

We could move SortVersions, too, while we're at it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions