Expand description
§use-go-module
Go module path, version, dependency, and replacement primitives for RustUse.
§Experimental
use-go-module is experimental while use-go remains below 0.3.0.
§Example
use use_go_module::{GoModuleDependency, GoModulePath, GoModuleVersion};
let path = GoModulePath::new("example.com/project")?;
let version = GoModuleVersion::new("v1.2.3")?;
let dependency = GoModuleDependency::new(path, version);
assert_eq!(dependency.path().as_str(), "example.com/project");
assert_eq!(dependency.version().as_str(), "v1.2.3");§Scope
- Lightweight Go module paths and versions.
- Dependency, requirement, replacement, and directive-kind metadata.
- Pseudo-version-shaped labels for metadata use.
§Non-goals
- Full semantic import versioning.
- Module graph resolution.
- Contacting module proxies or registries.
- Shelling out to
go mod.
§License
Licensed under either Apache-2.0 or MIT.
Structs§
- GoModule
Dependency - Go module dependency metadata.
- GoModule
Path - Validated Go module path metadata.
- GoModule
Replacement - Go module replacement metadata.
- GoModule
Requirement - Go module requirement metadata.
- GoModule
Version - Validated Go module version metadata.
- GoPseudo
Version - Validated Go pseudo-version metadata.
Enums§
- GoModule
Directive Kind - Go module directive kind metadata.
- GoModule
Error - Error returned by Go module metadata constructors.