Skip to content

Commit

Permalink
update format call to inline path
Browse files Browse the repository at this point in the history
Co-authored-by: David Herberth <[email protected]>
Signed-off-by: Greg Cusack <[email protected]>
  • Loading branch information
Greg Cusack and Dav1dde authored Nov 21, 2023
1 parent 589e7b0 commit 45c8558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/dynamic_jsonpath.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async fn main() -> anyhow::Result<()> {
let field_selector = std::env::var("FIELD_SELECTOR").unwrap_or_default();
let jsonpath = {
let path = std::env::var("JSONPATH").unwrap_or_else(|_| ".items[*].spec.containers[*].image".into());
format!("{}{}", "$", path.clone())
format!("${path}")
.parse::<JsonPathInst>()
.map_err(Error::msg)
.with_context(|| {
Expand Down

0 comments on commit 45c8558

Please sign in to comment.