Add syntax highlighting to the README example
Look at this with the `-w` switch and you'll see that all that has changed is that I wrapped the example code with some "```" and adjusted the indent.
- Id
- 46299ed8f92ede0d648c75124aa8e61e2a87cf18
- Author
- Caio
- Commit time
- 2016-08-18T19:31:33+02:00
Modified README.md
## Usage
- package main
+```go
+package main
- import (
- "fmt"
- "math/rand"
+import (
+ "fmt"
+ "math/rand"
- "github.com/caio/go-tdigest"
- )
+ "github.com/caio/go-tdigest"
+)
- func main() {
- var t = tdigest.New(100)
+func main() {
+ var t = tdigest.New(100)
- for i := 0; i < 10000; i++ {
- t.Add(rand.Float64(), 1)
- }
+ for i := 0; i < 10000; i++ {
+ t.Add(rand.Float64(), 1)
+ }
- fmt.Printf("p(.5) = %.6f\n", t.Quantile(0.5))
- }
+ fmt.Printf("p(.5) = %.6f\n", t.Quantile(0.5))
+}
+```
## Disclaimer