Skip to content

Instantly share code, notes, and snippets.

@ihcsim
Last active February 1, 2022 05:01
Show Gist options
  • Save ihcsim/34d898cd33aebbadd66635a90d10fe71 to your computer and use it in GitHub Desktop.
Save ihcsim/34d898cd33aebbadd66635a90d10fe71 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(),
},
];
let nginx = svcs[0];
println!("{:?}", nginx);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment