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

Function as_urn

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

323
324/// Wrap a local id into `urn:atomic:<kind>:<local>` unless already a urn.
325fn as_urn(kind: &str, local: &str) -> String {
326 if local.starts_with("urn:atomic:") {
327 local.to_string()
328 } else {
329 format!("urn:atomic:{kind}:{local}")
330 }
331}
332
333fn slug(s: &str) -> String {
334 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