MCPcopy Create free account
hub / github.com/emwalker/digraph / parse_args

Function parse_args

backend/src/bin/migrate.rs:200–216  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

198}
199
200fn parse_args() -> Opts {
201 let args: Vec<String> = std::env::args().collect();
202
203 let mut opts = getopts::Options::new();
204 opts.optflag("d", "destructive", "run destructive migrations");
205
206 let matches = match opts.parse(&args[1..]) {
207 Ok(m) => m,
208 Err(f) => {
209 panic!("{}", f.to_string())
210 }
211 };
212
213 Opts {
214 destructive_migrations: matches.opt_present("d"),
215 }
216}
217
218#[tokio::main]
219async fn main() -> async_graphql::Result<()> {

Callers 1

mainFunction · 0.70

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected