Syntax highlighting in README.markdown
diff --git a/README.markdown b/README.markdown
index f94e815..5fcdfa4 100644
--- a/README.markdown
+++ b/README.markdown
@@ -15,7 +15,9 @@
Example:
- fmt.Printf("That file is %s.", humanize.Bytes(82854982))
+```go
+fmt.Printf("That file is %s.", humanize.Bytes(82854982))
+```
## Times
@@ -24,7 +26,9 @@
Example:
- fmt.Printf("This was touched %s", humanize.Time(someTimeInstance))
+```go
+fmt.Printf("This was touched %s", humanize.Time(someTimeInstance))
+```
Thanks to Kyle Lemons for the time implementation from an IRC
conversation one day. It's pretty neat.
@@ -43,7 +47,9 @@
Example:
- fmt.Printf("You're my %s best friend.", humanize.Ordinal(193))
+```go
+fmt.Printf("You're my %s best friend.", humanize.Ordinal(193))
+```
## Commas
@@ -57,16 +63,20 @@
Example:
- fmt.Printf("You owe $%s.\n", humanize.Comma(6582491))
+```go
+fmt.Printf("You owe $%s.\n", humanize.Comma(6582491))
+```
## Ftoa
Nicer float64 formatter that removes trailing zeros.
- fmt.Printf("%f", 2.24) // 2.240000
- fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24
- fmt.Printf("%f", 2.0) // 2.000000
- fmt.Printf("%s", humanize.Ftoa(2.0)) // 2
+```go
+fmt.Printf("%f", 2.24) // 2.240000
+fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24
+fmt.Printf("%f", 2.0) // 2.000000
+fmt.Printf("%s", humanize.Ftoa(2.0)) // 2
+```
## SI notation
@@ -74,8 +84,9 @@
Example:
- humanize.SI(0.00000000223, "M") // 2.23nM
-
+```go
+humanize.SI(0.00000000223, "M") // 2.23nM
+```
[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion
[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix