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

Function as_urn

atomic-canonical/src/lift.rs:312–318  ·  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

310
311/// Wrap a local id into `urn:atomic:<kind>:<local>` unless already a urn.
312fn as_urn(kind: &str, local: &str) -> String {
313 if local.starts_with("urn:atomic:") {
314 local.to_string()
315 } else {
316 format!("urn:atomic:{kind}:{local}")
317 }
318}
319
320fn slug(s: &str) -> String {
321 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