-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module: forward to x/mod/module (#211)
The golang.org/x/mod/module is now the canonical location of this package.
- Loading branch information
Showing
3 changed files
with
59 additions
and
858 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// 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. | ||
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) | ||
} |
Oops, something went wrong.