package module

import "github.com/rogpeppe/go-internal/module"

Package module is a thin forwarding layer on top of golang.org/x/mod/module. Note that the Encode* and Decode* functions map to Escape* and Unescape* in that package.

See that package for documentation on everything else.

Deprecated: use golang.org/x/mod/module instead.

Index

Functions

func CanonicalVersion

func CanonicalVersion(v string) string

func Check

func Check(path, version string) error

func CheckFilePath

func CheckFilePath(path string) error

func CheckImportPath

func CheckImportPath(path string) error

func CheckPath

func CheckPath(path string) error

func DecodePath

func DecodePath(encoding string) (path string, err error)

func DecodeVersion

func DecodeVersion(encoding string) (v string, err error)

func EncodePath

func EncodePath(path string) (encoding string, err error)

func EncodeVersion

func EncodeVersion(v string) (encoding string, err error)

func MatchPathMajor

func MatchPathMajor(v, pathMajor string) bool

func Sort

func Sort(list []Version)

func SplitPathVersion

func SplitPathVersion(path string) (prefix, pathMajor string, ok bool)

Types

type Version

type Version = module.Version

Source Files

forward.go

Version
v1.14.1 (latest)
Published
Feb 25, 2025
Platform
js/wasm
Imports
1 packages
Last checked
1 day ago

Tools for package owners.