1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
// 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.
package module
import "golang.org/x/mod/module"
type Version = module.Version
func Check(path, version string) error {
return module.Check(path, version)
}
func CheckPath(path string) error {
return module.CheckPath(path)
}
func CheckImportPath(path string) error {
return module.CheckImportPath(path)
}
func CheckFilePath(path string) error {
return module.CheckFilePath(path)
}
func SplitPathVersion(path string) (prefix, pathMajor string, ok bool) {
return module.SplitPathVersion(path)
}
func MatchPathMajor(v, pathMajor string) bool {
return module.MatchPathMajor(v, pathMajor)
}
func CanonicalVersion(v string) string {
return module.CanonicalVersion(v)
}
func Sort(list []Version) {
module.Sort(list)
}
func EncodePath(path string) (encoding string, err error) {
return module.EscapePath(path)
}
func EncodeVersion(v string) (encoding string, err error) {
return module.EscapeVersion(v)
}
func DecodePath(encoding string) (path string, err error) {
return module.UnescapePath(encoding)
}
func DecodeVersion(encoding string) (v string, err error) {
return module.UnescapeVersion(encoding)
}
|