MCPcopy Create free account
hub / github.com/cargo-lambda/cargo-lambda / translate_shortcut

Function translate_shortcut

crates/cargo-lambda-new/src/template.rs:370–380  ·  view source on GitHub ↗
(uri: &str)

Source from the content-addressed store, hash-verified

368}
369
370fn translate_shortcut(uri: &str) -> Option<String> {
371 if uri.starts_with("gh:") {
372 Some(uri.replace("gh:", "https://github.com/"))
373 } else if uri.starts_with("gl:") {
374 Some(uri.replace("gl:", "https://gitlab.com/"))
375 } else if uri.starts_with("bb:") {
376 Some(uri.replace("bb:", "https://bitbucket.org/"))
377 } else {
378 None
379 }
380}
381
382#[cfg(test)]
383mod test {

Callers 1

match_git_http_urlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected