Skip to content

Instantly share code, notes, and snippets.

@ihcsim
Last active February 1, 2022 05:00
Show Gist options
  • Save ihcsim/32aa40433867a11c082ff4f0270cdf6e to your computer and use it in GitHub Desktop.
Save ihcsim/32aa40433867a11c082ff4f0270cdf6e to your computer and use it in GitHub Desktop.
#[derive(Debug)]
struct Service {
name: String,
namespace: String,
}
fn main() {
let svcs = vec![
Service {
name: "nginx".to_string(),
namespace: "default".to_string(),
},
Service {
name: "haproxy".to_string(),
namespace: "default".to_string(),
},
];
for svc in svcs {
println!("{:?}", svc);
}
println!("{:?}", svcs);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment