use-go-version 0.0.1

Go version and toolchain primitives for RustUse
Documentation
  • Coverage
  • 78.79%
    26 out of 33 items documented1 out of 26 items with examples
  • Size
  • Source code size: 16.28 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 999.41 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-go
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-go-version

Go version and toolchain primitives for RustUse.

Experimental

use-go-version is experimental while use-go remains below 0.3.0.

Example

use use_go_version::{GoToolchainVersion, GoVersion};

let version: GoVersion = "go1.22.0".parse()?;
let toolchain = GoToolchainVersion::new(version);

assert_eq!(version.major(), 1);
assert_eq!(version.minor(), Some(22));
assert_eq!(version.patch(), Some(0));
assert_eq!(version.to_string(), "1.22.0");
assert_eq!(toolchain.to_string(), "go1.22.0");
# Ok::<(), use_go_version::GoVersionParseError>(())

Scope

  • Lightweight Go version labels such as 1, 1.21, and go1.22.0.
  • Toolchain and compatibility wrappers around parsed Go versions.
  • Version-family helpers for major Go release lines.

Non-goals

  • Hardcoded Go release support windows or EOL dates.
  • Full Go toolchain discovery.
  • Shelling out to go version.
  • Module compatibility decisions.

License

Licensed under either Apache-2.0 or MIT.