File: forward.go

package info (click to toggle)
golang-github-rogpeppe-go-internal 1.14.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,188 kB
  • sloc: makefile: 6
file content (61 lines) | stat: -rw-r--r-- 1,422 bytes parent folder | download | duplicates (2)
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)
}