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