use-go-keyword 0.0.1

Go keyword and predeclared identifier primitives for RustUse
Documentation
  • Coverage
  • 12.94%
    11 out of 85 items documented1 out of 11 items with examples
  • Size
  • Source code size: 15.06 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 689.32 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-keyword

Go keyword and predeclared identifier primitives for RustUse.

Experimental

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

Example

use use_go_keyword::{GoKeyword, is_go_predeclared_identifier, is_go_reserved_word};

let keyword: GoKeyword = "func".parse()?;

assert_eq!(keyword.to_string(), "func");
assert!(is_go_predeclared_identifier("nil"));
assert!(is_go_reserved_word("package"));
# Ok::<(), use_go_keyword::GoKeywordParseError>(())

Scope

  • Go keyword labels with source spelling.
  • Common Go predeclared identifiers.
  • A small reserved-word wrapper for keyword or predeclared identifier membership.

Non-goals

  • Identifier validation.
  • Go source-code parsing.
  • Version-specific language feature decisions.

License

Licensed under either Apache-2.0 or MIT.