Skip to content

nils-degroot/netrc_util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netrc_util

crates.io

A simple libary for parsing netrc files.

Usage

use netrc_util::{Host, NetrcParser};

fn main() {
    let netrc_content = "machine sample.test login user password pass";
    let host = Host::parse("sample.test").unwrap();

    let entry = NetrcParser::new(netrc_content).entry_for_host(&host).unwrap().unwrap();

    assert_eq!(entry.login(), Some("login"));
    assert_eq!(entry.password(), Some("pass"));
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages