mirror of
https://github.com/Hopiu/lychee.git
synced 2026-05-16 01:33:10 +00:00
This commit is contained in:
parent
bfeeb28e1d
commit
a50c04fffe
3 changed files with 6 additions and 7 deletions
|
|
@ -189,7 +189,8 @@ OPTIONS:
|
|||
ARGS:
|
||||
<inputs>... The inputs (where to get links to check from). These can be: files (e.g. `README.md`), file globs
|
||||
(e.g. `"~/git/*/README.md"`), remote URLs (e.g. `https://example.com/README.md`) or standard
|
||||
input (`-`) [default: README.md]
|
||||
input (`-`). Prefix with `--` to separate inputs from options that allow multiple arguments
|
||||
[default: README.md]
|
||||
```
|
||||
|
||||
### Exit codes
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ pub(crate) struct LycheeOptions {
|
|||
/// The inputs (where to get links to check from).
|
||||
/// These can be: files (e.g. `README.md`), file globs (e.g. `"~/git/*/README.md"`),
|
||||
/// remote URLs (e.g. `https://example.com/README.md`) or standard input (`-`).
|
||||
/// Prefix with `--` to separate inputs from options that allow multiple arguments.
|
||||
#[structopt(name = "inputs", default_value = "README.md")]
|
||||
raw_inputs: Vec<String>,
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ impl Input {
|
|||
}
|
||||
}
|
||||
Stdin => Ok(vec![Self::stdin_content(file_type_hint).await?]),
|
||||
String(s) => Ok(vec![Self::string_content(s, file_type_hint)?]),
|
||||
String(s) => Ok(vec![Self::string_content(s, file_type_hint)]),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -152,11 +152,8 @@ impl Input {
|
|||
Ok(input_content)
|
||||
}
|
||||
|
||||
fn string_content(s: &str, file_type_hint: Option<FileType>) -> Result<InputContent> {
|
||||
Ok(InputContent::from_string(
|
||||
s,
|
||||
file_type_hint.unwrap_or_default(),
|
||||
))
|
||||
fn string_content(s: &str, file_type_hint: Option<FileType>) -> InputContent {
|
||||
InputContent::from_string(s, file_type_hint.unwrap_or_default())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue