Skip to main content

input_required

Function input_required 

Source
pub fn input_required(name: &str) -> Result<String>
Expand description

Read a required input, trimmed.

§Errors

Error::MissingRequiredInput when absent or empty.

§Examples

// `target` was never provided -> a typed error, not a panic.
let err = actions_rs::input::input_required("target").unwrap_err();
assert!(matches!(err, actions_rs::Error::MissingRequiredInput(_)));