get_slug

Function get_slug 

Source
pub fn get_slug(input: &str) -> String
Expand description

Get a slug version of the text compatible with a tag name to be published in a docker registry, with only number, letters, the symbol “-” or the symbol “.”, and no more than 63 characters long, all in lowercase.

use docker_pose::get_slug;

assert_eq!(get_slug("some/branch"), "some-branch".to_string());
assert_eq!(get_slug("Yeap!spaces and UpperCase  "), "yeap-spaces-and-uppercase".to_string());