+fn run_cmd() -> () {
+ let child = Command::new("go")
+ .args(["build", "-v", "-o", "bandirs", "."])
+ .current_dir("/home/tux/Documenti/sviluppo/bandi_fe_go/")
+ .stdout(Stdio::piped())
+ .stderr(Stdio::piped())
+ .spawn()
+ .expect("Process failed.");
+
+ let mut sstdout = String::new();
+ let mut stdout = child.stdout.unwrap();
+ stdout.read_to_string(&mut sstdout).expect("cannot read stdout");
+
+ let mut sstderr = String::new();
+ let mut stderr = child.stderr.unwrap();
+ stderr.read_to_string(&mut sstderr).expect("cannot read stderr");
+
+ println!("{:?}", stdout);
+ println!("{}", sstdout);
+ println!("{:?}", stderr);
+ println!("{}", sstderr);
+}
+