Skip to main content

Crate use_go_work

Crate use_go_work 

Source
Expand description

§use-go-work

go.work workspace metadata primitives for RustUse.

§Experimental

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

§Example

use use_go_work::{GoWorkDirective, GoWorkFile, GoWorkModulePath, GoWorkUseDirective};

let module = GoWorkModulePath::new("./app")?;
let file = GoWorkFile::new().with_directive(GoWorkDirective::Use(GoWorkUseDirective::new(module)));

assert_eq!(file.directives().len(), 1);

§Scope

  • go.work config file and directive metadata.
  • Workspace module path metadata.
  • Workspace layout labels.

§Non-goals

  • Complete go.work parsing.
  • Workspace or module resolution.
  • Shelling out to go work.
  • Generating Go workspaces.

§License

Licensed under either Apache-2.0 or MIT.

Structs§

GoWorkFile
Lightweight go.work file metadata.
GoWorkModulePath
Validated go.work module path metadata.
GoWorkReplaceDirective
replace directive metadata.
GoWorkUseDirective
use directive metadata.

Enums§

GoWorkConfigFile
go.work config file kind.
GoWorkDirective
go.work directive metadata.
GoWorkError
Error returned by Go workspace metadata constructors.
GoWorkspaceLayout
Go workspace layout metadata.