mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2025-08-18 05:03:27 +02:00
Compare commits
3 Commits
dagger-cor
...
feat/async
Author | SHA1 | Date | |
---|---|---|---|
986a64cbc7
|
|||
2695a10f24
|
|||
05e1b8bd30
|
@@ -1,12 +1,12 @@
|
|||||||
use convert_case::{Case, Casing};
|
use convert_case::{Case, Casing};
|
||||||
use dagger_core::introspection::FullTypeFields;
|
use dagger_core::introspection::{FullTypeFields, TypeRef};
|
||||||
use genco::prelude::rust;
|
use genco::prelude::rust;
|
||||||
use genco::quote;
|
use genco::quote;
|
||||||
use genco::tokens::quoted;
|
use genco::tokens::quoted;
|
||||||
|
|
||||||
use crate::functions::{
|
use crate::functions::{
|
||||||
type_field_has_optional, type_ref_is_list_of_objects, type_ref_is_object,
|
type_field_has_optional, type_ref_is_list_of_objects, type_ref_is_object, type_ref_is_optional,
|
||||||
type_ref_is_optional, CommonFunctions,
|
CommonFunctions,
|
||||||
};
|
};
|
||||||
use crate::utility::OptionExt;
|
use crate::utility::OptionExt;
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ pub fn format_function(funcs: &CommonFunctions, field: &FullTypeFields) -> Optio
|
|||||||
let output_type = field
|
let output_type = field
|
||||||
.type_
|
.type_
|
||||||
.pipe(|t| &t.type_ref)
|
.pipe(|t| &t.type_ref)
|
||||||
.pipe(|t| funcs.format_output_type(t));
|
.pipe(|t| render_output_type(funcs, t));
|
||||||
|
|
||||||
Some(quote! {
|
Some(quote! {
|
||||||
$(signature)(
|
$(signature)(
|
||||||
@@ -67,7 +67,7 @@ fn render_required_args(_funcs: &CommonFunctions, field: &FullTypeFields) -> Opt
|
|||||||
let name = &s.input_value.name;
|
let name = &s.input_value.name;
|
||||||
|
|
||||||
Some(quote! {
|
Some(quote! {
|
||||||
query = query.arg($(quoted(name)), $(n)).unwrap();
|
query = query.arg($(quoted(name)), $(n));
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -98,7 +98,7 @@ fn render_optional_args(_funcs: &CommonFunctions, field: &FullTypeFields) -> Opt
|
|||||||
|
|
||||||
Some(quote! {
|
Some(quote! {
|
||||||
if let Some($(&n)) = opts.$(&n) {
|
if let Some($(&n)) = opts.$(&n) {
|
||||||
query = query.arg($(quoted(name)), $(&n)).unwrap();
|
query = query.arg($(quoted(name)), $(&n));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -122,6 +122,20 @@ fn render_optional_args(_funcs: &CommonFunctions, field: &FullTypeFields) -> Opt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn render_output_type(funcs: &CommonFunctions, type_ref: &TypeRef) -> rust::Tokens {
|
||||||
|
let output_type = funcs.format_output_type(type_ref);
|
||||||
|
|
||||||
|
if type_ref_is_object(type_ref) || type_ref_is_list_of_objects(type_ref) {
|
||||||
|
return quote! {
|
||||||
|
$(output_type)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
quote! {
|
||||||
|
eyre::Result<$output_type>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn render_execution(funcs: &CommonFunctions, field: &FullTypeFields) -> rust::Tokens {
|
fn render_execution(funcs: &CommonFunctions, field: &FullTypeFields) -> rust::Tokens {
|
||||||
if let Some(true) = field.type_.pipe(|t| type_ref_is_object(&t.type_ref)) {
|
if let Some(true) = field.type_.pipe(|t| type_ref_is_object(&t.type_ref)) {
|
||||||
let output_type = funcs.format_output_type(&field.type_.as_ref().unwrap().type_ref);
|
let output_type = funcs.format_output_type(&field.type_.as_ref().unwrap().type_ref);
|
||||||
@@ -163,7 +177,7 @@ fn render_execution(funcs: &CommonFunctions, field: &FullTypeFields) -> rust::To
|
|||||||
let graphql_client = rust::import("crate::client", "graphql_client");
|
let graphql_client = rust::import("crate::client", "graphql_client");
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
query.execute(&$graphql_client(&self.conn)).unwrap().unwrap()
|
query.execute(&$graphql_client(&self.conn))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
use dagger_sdk::gen::HostDirectoryOpts;
|
use dagger_sdk::HostDirectoryOpts;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let host_source_dir = client.host().directory(
|
let host_source_dir = client.host().directory(
|
||||||
"examples/build-the-application/app".into(),
|
"examples/build-the-application/app".into(),
|
||||||
@@ -14,7 +14,7 @@ fn main() -> eyre::Result<()> {
|
|||||||
let source = client
|
let source = client
|
||||||
.container(None)
|
.container(None)
|
||||||
.from("node:16".into())
|
.from("node:16".into())
|
||||||
.with_mounted_directory("/src".into(), host_source_dir.id());
|
.with_mounted_directory("/src".into(), host_source_dir.id()?);
|
||||||
|
|
||||||
let runner = source
|
let runner = source
|
||||||
.with_workdir("/src".into())
|
.with_workdir("/src".into())
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
use dagger_sdk::gen::HostDirectoryOpts;
|
use dagger_sdk::HostDirectoryOpts;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let host_source_dir = client.host().directory(
|
let host_source_dir = client.host().directory(
|
||||||
"./examples/caching/app".into(),
|
"./examples/caching/app".into(),
|
||||||
@@ -12,12 +12,12 @@ fn main() -> eyre::Result<()> {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
let node_cache = client.cache_volume("node".into()).id();
|
let node_cache = client.cache_volume("node".into()).id()?;
|
||||||
|
|
||||||
let source = client
|
let source = client
|
||||||
.container(None)
|
.container(None)
|
||||||
.from("node:16".into())
|
.from("node:16".into())
|
||||||
.with_mounted_directory("/src".into(), host_source_dir.id())
|
.with_mounted_directory("/src".into(), host_source_dir.id()?)
|
||||||
.with_mounted_cache("/src/node_modules".into(), node_cache, None);
|
.with_mounted_cache("/src/node_modules".into(), node_cache, None);
|
||||||
|
|
||||||
let runner = source
|
let runner = source
|
||||||
@@ -43,11 +43,11 @@ fn main() -> eyre::Result<()> {
|
|||||||
let ref_ = client
|
let ref_ = client
|
||||||
.container(None)
|
.container(None)
|
||||||
.from("nginx".into())
|
.from("nginx".into())
|
||||||
.with_directory("/usr/share/nginx/html".into(), build_dir.id(), None)
|
.with_directory("/usr/share/nginx/html".into(), build_dir.id()?, None)
|
||||||
.publish(
|
.publish(
|
||||||
format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()),
|
format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()),
|
||||||
None,
|
None,
|
||||||
);
|
)?;
|
||||||
|
|
||||||
println!("published image to: {}", ref_);
|
println!("published image to: {}", ref_);
|
||||||
|
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
|
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
|
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let context_dir = client
|
let context_dir = client
|
||||||
.host()
|
.host()
|
||||||
@@ -12,11 +11,11 @@ fn main() -> eyre::Result<()> {
|
|||||||
|
|
||||||
let ref_ = client
|
let ref_ = client
|
||||||
.container(None)
|
.container(None)
|
||||||
.build(context_dir.id(), None)
|
.build(context_dir.id()?, None)
|
||||||
.publish(
|
.publish(
|
||||||
format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()),
|
format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()),
|
||||||
None,
|
None,
|
||||||
);
|
)?;
|
||||||
|
|
||||||
println!("published image to: {}", ref_);
|
println!("published image to: {}", ref_);
|
||||||
|
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let version = client
|
let version = client
|
||||||
.container(None)
|
.container(None)
|
||||||
.from("golang:1.19".into())
|
.from("golang:1.19".into())
|
||||||
.with_exec(vec!["go".into(), "version".into()], None)
|
.with_exec(vec!["go".into(), "version".into()], None)
|
||||||
.stdout();
|
.stdout()?;
|
||||||
|
|
||||||
println!("Hello from Dagger and {}", version.trim());
|
println!("Hello from Dagger and {}", version.trim());
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
use dagger_sdk::gen::HostDirectoryOpts;
|
use dagger_sdk::HostDirectoryOpts;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let host_source_dir = client.host().directory(
|
let host_source_dir = client.host().directory(
|
||||||
"examples/publish-the-application/app".into(),
|
"examples/publish-the-application/app".into(),
|
||||||
@@ -15,7 +15,7 @@ fn main() -> eyre::Result<()> {
|
|||||||
let source = client
|
let source = client
|
||||||
.container(None)
|
.container(None)
|
||||||
.from("node:16".into())
|
.from("node:16".into())
|
||||||
.with_mounted_directory("/src".into(), host_source_dir.id());
|
.with_mounted_directory("/src".into(), host_source_dir.id()?);
|
||||||
|
|
||||||
let runner = source
|
let runner = source
|
||||||
.with_workdir("/src".into())
|
.with_workdir("/src".into())
|
||||||
@@ -40,11 +40,11 @@ fn main() -> eyre::Result<()> {
|
|||||||
let ref_ = client
|
let ref_ = client
|
||||||
.container(None)
|
.container(None)
|
||||||
.from("nginx".into())
|
.from("nginx".into())
|
||||||
.with_directory("/usr/share/nginx/html".into(), build_dir.id(), None)
|
.with_directory("/usr/share/nginx/html".into(), build_dir.id()?, None)
|
||||||
.publish(
|
.publish(
|
||||||
format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()),
|
format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()),
|
||||||
None,
|
None,
|
||||||
);
|
)?;
|
||||||
|
|
||||||
println!("published image to: {}", ref_);
|
println!("published image to: {}", ref_);
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
use dagger_sdk::gen::HostDirectoryOpts;
|
use dagger_sdk::HostDirectoryOpts;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
let output = "examples/publish-the-application/app/build";
|
let output = "examples/publish-the-application/app/build";
|
||||||
|
|
||||||
let host_source_dir = client.host().directory(
|
let host_source_dir = client.host().directory(
|
||||||
@@ -16,7 +16,7 @@ fn main() -> eyre::Result<()> {
|
|||||||
let source = client
|
let source = client
|
||||||
.container(None)
|
.container(None)
|
||||||
.from("node:16".into())
|
.from("node:16".into())
|
||||||
.with_mounted_directory("/src".into(), host_source_dir.id());
|
.with_mounted_directory("/src".into(), host_source_dir.id()?);
|
||||||
|
|
||||||
let runner = source
|
let runner = source
|
||||||
.with_workdir("/src".into())
|
.with_workdir("/src".into())
|
||||||
@@ -44,13 +44,13 @@ fn main() -> eyre::Result<()> {
|
|||||||
.from("nginx".into())
|
.from("nginx".into())
|
||||||
.with_directory(
|
.with_directory(
|
||||||
"/usr/share/nginx/html".into(),
|
"/usr/share/nginx/html".into(),
|
||||||
client.host().directory(output.into(), None).id(),
|
client.host().directory(output.into(), None).id()?,
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
.publish(
|
.publish(
|
||||||
format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()),
|
format!("ttl.sh/hello-dagger-rs-{}:1h", rng.gen::<u64>()),
|
||||||
None,
|
None,
|
||||||
);
|
)?;
|
||||||
|
|
||||||
println!("published image to: {}", ref_);
|
println!("published image to: {}", ref_);
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
use dagger_sdk::gen::HostDirectoryOpts;
|
use dagger_sdk::HostDirectoryOpts;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let host_source_dir = client.host().directory(
|
let host_source_dir = client.host().directory(
|
||||||
"examples/test-the-application/app".into(),
|
"examples/test-the-application/app".into(),
|
||||||
@@ -14,7 +14,7 @@ fn main() -> eyre::Result<()> {
|
|||||||
let source = client
|
let source = client
|
||||||
.container(None)
|
.container(None)
|
||||||
.from("node:16".into())
|
.from("node:16".into())
|
||||||
.with_mounted_directory("/src".into(), host_source_dir.id());
|
.with_mounted_directory("/src".into(), host_source_dir.id()?);
|
||||||
|
|
||||||
let runner = source
|
let runner = source
|
||||||
.with_workdir("/src".into())
|
.with_workdir("/src".into())
|
||||||
@@ -30,7 +30,7 @@ fn main() -> eyre::Result<()> {
|
|||||||
],
|
],
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
.stderr();
|
.stderr()?;
|
||||||
|
|
||||||
println!("{}", out);
|
println!("{}", out);
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,6 @@
|
|||||||
pub mod client;
|
mod client;
|
||||||
pub mod gen;
|
mod gen;
|
||||||
mod querybuilder;
|
mod querybuilder;
|
||||||
|
|
||||||
pub fn add(left: usize, right: usize) -> usize {
|
pub use client::*;
|
||||||
left + right
|
pub use gen::*;
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn it_works() {
|
|
||||||
let result = add(2, 2);
|
|
||||||
assert_eq!(result, 4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@@ -46,13 +46,13 @@ impl Selection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn arg<S>(&self, name: &str, value: S) -> eyre::Result<Selection>
|
pub fn arg<S>(&self, name: &str, value: S) -> Selection
|
||||||
where
|
where
|
||||||
S: Serialize,
|
S: Serialize,
|
||||||
{
|
{
|
||||||
let mut s = self.clone();
|
let mut s = self.clone();
|
||||||
|
|
||||||
let val = serde_json::to_string(&value)?;
|
let val = serde_json::to_string(&value).unwrap();
|
||||||
|
|
||||||
match s.args.as_mut() {
|
match s.args.as_mut() {
|
||||||
Some(args) => {
|
Some(args) => {
|
||||||
@@ -65,7 +65,7 @@ impl Selection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(s)
|
s
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build(&self) -> eyre::Result<String> {
|
pub fn build(&self) -> eyre::Result<String> {
|
||||||
@@ -93,7 +93,7 @@ impl Selection {
|
|||||||
Ok(fields.join("{") + &"}".repeat(fields.len() - 1))
|
Ok(fields.join("{") + &"}".repeat(fields.len() - 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn execute<D>(&self, gql_client: &gql_client::Client) -> eyre::Result<Option<D>>
|
pub fn execute<D>(&self, gql_client: &gql_client::Client) -> eyre::Result<D>
|
||||||
where
|
where
|
||||||
D: for<'de> Deserialize<'de>,
|
D: for<'de> Deserialize<'de>,
|
||||||
{
|
{
|
||||||
@@ -111,7 +111,7 @@ impl Selection {
|
|||||||
|
|
||||||
let resp: Option<D> = self.unpack_resp(resp)?;
|
let resp: Option<D> = self.unpack_resp(resp)?;
|
||||||
|
|
||||||
Ok(resp)
|
Ok(resp.unwrap())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn path(&self) -> Vec<Selection> {
|
fn path(&self) -> Vec<Selection> {
|
||||||
@@ -171,10 +171,8 @@ mod tests {
|
|||||||
.select("core")
|
.select("core")
|
||||||
.select("image")
|
.select("image")
|
||||||
.arg("ref", "alpine")
|
.arg("ref", "alpine")
|
||||||
.unwrap()
|
|
||||||
.select("file")
|
.select("file")
|
||||||
.arg("path", "/etc/alpine-release")
|
.arg("path", "/etc/alpine-release");
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let query = root.build().unwrap();
|
let query = root.build().unwrap();
|
||||||
|
|
||||||
@@ -190,10 +188,8 @@ mod tests {
|
|||||||
.select("core")
|
.select("core")
|
||||||
.select("image")
|
.select("image")
|
||||||
.arg("ref", "alpine")
|
.arg("ref", "alpine")
|
||||||
.unwrap()
|
|
||||||
.select_with_alias("foo", "file")
|
.select_with_alias("foo", "file")
|
||||||
.arg("path", "/etc/alpine-release")
|
.arg("path", "/etc/alpine-release");
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let query = root.build().unwrap();
|
let query = root.build().unwrap();
|
||||||
|
|
||||||
@@ -208,10 +204,8 @@ mod tests {
|
|||||||
let root = query()
|
let root = query()
|
||||||
.select("a")
|
.select("a")
|
||||||
.arg("arg", "one")
|
.arg("arg", "one")
|
||||||
.unwrap()
|
|
||||||
.select("b")
|
.select("b")
|
||||||
.arg("arg", "two")
|
.arg("arg", "two");
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let query = root.build().unwrap();
|
let query = root.build().unwrap();
|
||||||
|
|
||||||
@@ -222,7 +216,7 @@ mod tests {
|
|||||||
fn test_vec_arg() {
|
fn test_vec_arg() {
|
||||||
let input = vec!["some-string"];
|
let input = vec!["some-string"];
|
||||||
|
|
||||||
let root = query().select("a").arg("arg", input).unwrap();
|
let root = query().select("a").arg("arg", input);
|
||||||
let query = root.build().unwrap();
|
let query = root.build().unwrap();
|
||||||
|
|
||||||
assert_eq!(query, r#"query{a(arg:["some-string"])}"#.to_string())
|
assert_eq!(query, r#"query{a(arg:["some-string"])}"#.to_string())
|
||||||
@@ -232,7 +226,7 @@ mod tests {
|
|||||||
fn test_ref_slice_arg() {
|
fn test_ref_slice_arg() {
|
||||||
let input = &["some-string"];
|
let input = &["some-string"];
|
||||||
|
|
||||||
let root = query().select("a").arg("arg", input).unwrap();
|
let root = query().select("a").arg("arg", input);
|
||||||
let query = root.build().unwrap();
|
let query = root.build().unwrap();
|
||||||
|
|
||||||
assert_eq!(query, r#"query{a(arg:["some-string"])}"#.to_string())
|
assert_eq!(query, r#"query{a(arg:["some-string"])}"#.to_string())
|
||||||
@@ -242,7 +236,7 @@ mod tests {
|
|||||||
fn test_stringb_arg() {
|
fn test_stringb_arg() {
|
||||||
let input = "some-string".to_string();
|
let input = "some-string".to_string();
|
||||||
|
|
||||||
let root = query().select("a").arg("arg", input).unwrap();
|
let root = query().select("a").arg("arg", input);
|
||||||
let query = root.build().unwrap();
|
let query = root.build().unwrap();
|
||||||
|
|
||||||
assert_eq!(query, r#"query{a(arg:"some-string")}"#.to_string())
|
assert_eq!(query, r#"query{a(arg:"some-string")}"#.to_string())
|
||||||
@@ -275,7 +269,7 @@ mod tests {
|
|||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
|
|
||||||
let root = query().select("a").arg("arg", input).unwrap();
|
let root = query().select("a").arg("arg", input);
|
||||||
let query = root.build().unwrap();
|
let query = root.build().unwrap();
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
use dagger_sdk::client::connect;
|
use dagger_sdk::{connect, ContainerExecOpts};
|
||||||
use dagger_sdk::gen::ContainerExecOpts;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_example_container() {
|
fn test_example_container() {
|
||||||
@@ -15,7 +14,8 @@ fn test_example_container() {
|
|||||||
redirect_stderr: None,
|
redirect_stderr: None,
|
||||||
experimental_privileged_nesting: None,
|
experimental_privileged_nesting: None,
|
||||||
}))
|
}))
|
||||||
.stdout();
|
.stdout()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
assert_eq!(out, "3.16.2\n".to_string())
|
assert_eq!(out, "3.16.2\n".to_string())
|
||||||
}
|
}
|
||||||
|
@@ -4,8 +4,6 @@ pub mod cli;
|
|||||||
mod cli_generate;
|
mod cli_generate;
|
||||||
|
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
//
|
|
||||||
|
|
||||||
color_eyre::install().unwrap();
|
color_eyre::install().unwrap();
|
||||||
|
|
||||||
let args = std::env::args();
|
let args = std::env::args();
|
||||||
|
Reference in New Issue
Block a user