A running example of the code from:
- http://marcio.io/2015/07/handling-1-million-requests-per-minute-with-golang
- http://nesv.github.io/golang/2014/02/25/worker-queues-in-go.html
Small refactorings made to original code:
A running example of the code from:
Small refactorings made to original code:
package main | |
import ( | |
"bytes" | |
"encoding/base64" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" |
use std::process::Command; | |
const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION"); | |
fn main() { | |
println!("Hello, world!"); | |
println!("version: {}", VERSION.unwrap_or("dev")); | |
let output = Command::new("git") | |
.args(&["rev-parse", "HEAD"]) |
const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION"); | |
fn main() { | |
println!("Hello, world!"); | |
println!("version: {}", VERSION.unwrap_or("dev")); | |
} |