mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-15 04:52:34 +01:00
kjuulh
9762da895a
Now all opt values enter into a _opts function instead of the original. This avoids a lot of verbosity for both None in the case opts are unwanted, and Some() if they actually are. They are used like so: ```rust client.container().from("..."); client.container_opts(Some(ContainerOpts{ ... })) ``` Some from opts will be removed in a future commit/pr
14 lines
291 B
Rust
14 lines
291 B
Rust
fn main() -> eyre::Result<()> {
|
|
let client = dagger_sdk::connect()?;
|
|
|
|
let version = client
|
|
.container()
|
|
.from("golang:1.19")
|
|
.with_exec(vec!["go", "version".into()])
|
|
.stdout()?;
|
|
|
|
println!("Hello from Dagger and {}", version.trim());
|
|
|
|
Ok(())
|
|
}
|