4 个版本
使用旧的 Rust 2015
0.1.3 | 2017 年 11 月 19 日 |
---|---|
0.1.2 | 2017 年 11 月 6 日 |
0.1.1 | 2017 年 7 月 24 日 |
0.1.0 | 2017 年 7 月 24 日 |
#1228 在 文件系统
1,050 每月下载量
在 3 crates 中使用
18KB
347 行
codeowners

A Github CODEOWNERS 答题卡
安装
将以下内容添加到您的 Cargo.toml
过滤器中
[dependencies]
codeowners = "0.1"
用法
典型用法包括解析 CODEOWNERS 文件、解析它然后查询目标路径
extern crate codeowners;
use std::env;
fn main() {
if let (Some(owners_file), Some(path)) =
(env::args().nth(1), env::args().nth(2)) {
let owners = codeowners::from_path(owners_file);
match owners.of(&path) {
None => println!("{} is up for adoption", path),
Some(owners) => {
for owner in owners {
println!("{}", owner);
}
}
}
}
}
Doug Tangren (softprops) 2017
依赖
~3.5MB
~73K SLoC