MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / as_urn

Function as_urn

atomic-canonical/src/lift.rs:239–245  ·  view source on GitHub ↗

Wrap a local id into `urn:atomic: : ` unless already a urn.

(kind: &str, local: &str)

Source from the content-addressed store, hash-verified

237
238/// Wrap a local id into `urn:atomic:<kind>:<local>` unless already a urn.
239fn as_urn(kind: &str, local: &str) -> String {
240 if local.starts_with("urn:atomic:") {
241 local.to_string()
242 } else {
243 format!("urn:atomic:{kind}:{local}")
244 }
245}
246
247fn slug(s: &str) -> String {
248 s.to_lowercase()

Callers 5

lift_acFunction · 0.85
lift_taskFunction · 0.85
lift_scopeFunction · 0.85
lift_constraintFunction · 0.85
lift_refFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected