use-go-mod 0.0.1

go.mod metadata primitives for RustUse
Documentation
  • Coverage
  • 76.09%
    35 out of 46 items documented1 out of 35 items with examples
  • Size
  • Source code size: 13.37 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 982.11 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s 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-mod

go.mod metadata primitives for RustUse.

Experimental

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

Example

use use_go_mod::{GoModDirective, GoModFile, GoModModuleDirective};
use use_go_module::GoModulePath;

let module = GoModModuleDirective::new(GoModulePath::new("example.com/project")?);
let file = GoModFile::new().with_directive(GoModDirective::Module(module));

assert_eq!(file.directives().len(), 1);
# Ok::<(), use_go_module::GoModuleError>(())

Scope

  • go.mod directive metadata.
  • Module, Go, toolchain, require, replace, exclude, and retract directive models.
  • Metadata-only structures built from focused Go version and module primitives.

Non-goals

  • Complete go.mod parsing.
  • Module resolution.
  • Shelling out to go mod.
  • Contacting module registries or proxies.

License

Licensed under either Apache-2.0 or MIT.