git-url-parse 0.6.0

A parser for urls used by git
Documentation
use git_url_parse::{GitUrl, GitUrlParseError};

fn main() -> Result<(), GitUrlParseError> {
    env_logger::init();

    let test_vec = vec![
        "https://github.com/tjtelan/git-url-parse-rs.git",
        "git@github.com:tjtelan/git-url-parse-rs.git",
        "git@hostname:22/path/to/repo.git",
        "ssh://git@github.com:22/asdf/asdf.git",
        "https://token:x-oauth-basic@host.xz/path/to/repo.git/",
        "https://x-token-auth:token@host.xz/path/to/repo.git/",
        "git+ssh://git@some-host.com/and-the-path/name",
        "git://some-host.com/and-the-path/name",
        "host.tld:user/project-name.git",
        "file:///path/to/repo.git/",
        "~/path/to/repo.git/",
        "./path/to/repo.git/",
        "./path/to/repo.git",
        "/path/to/repo.git",
        "../test_repo",
        "..\\test_repo",
        "git@ssh.dev.azure.com:v3/CompanyName/ProjectName/RepoName",
        "https://CompanyName@dev.azure.com/CompanyName/ProjectName/_git/RepoName",
        "https://your_username@bitbucket.org/workspace_ID/repo_name.git",
        "ssh://git@bitbucket.org/workspace_ID/repo_name.git",
    ];

    for test_url in test_vec {
        let parsed = GitUrl::parse(test_url).unwrap();
        println!("Original: {}", test_url);
        println!("Parsed:   {}", parsed);
        println!("{:?}\n", parsed);
    }
    Ok(())
}