This commit is contained in:
Mark McGranaghan 2012-09-20 20:12:50 -07:00
parent 5e39ab34db
commit 88bd28f80c
2 changed files with 14 additions and 16 deletions

8
README
View File

@ -14,15 +14,13 @@ get web presence in good enough shape to point to from blog post
basic copy - landing, post-subscribe, post-confirm
subscription management
validate book style in editor
01-hello
22-varags
xx-rand
xx-sha1
validate content by filling out some examples
validate book style in web mockup
http://jashkenas.github.com/docco/
fork into gbe-book
join Google+ and claim website
= vision

View File

@ -8,20 +8,20 @@ import (
)
func main() {
f, _ := strconv.ParseFloat("1.234", 64) // `64` tells how many bits of precision to parse.
fmt.Println(f)
f, _ := strconv.ParseFloat("1.234", 64) // `64` tells how many bits of precision to parse.
fmt.Println(f)
i, _ := strconv.ParseInt("123", 0, 64) // `0` means infer the base from the string.
println(i) // `64` requires that the result fit in 64 bits.
i, _ := strconv.ParseInt("123", 0, 64) // `0` means infer the base from the string.
println(i) // `64` requires that the result fit in 64 bits.
d, _ := strconv.ParseInt("0x1b3e", 0, 64) // `ParseInt` will recognize hex-formatted numbers.
println(d)
d, _ := strconv.ParseInt("0x1b3e", 0, 64) // `ParseInt` will recognize hex-formatted numbers.
println(d)
k, _ := strconv.Atoi("456") // `Atoi` is a convenienice function for `int` parsing.
println(k)
_, e := strconv.Atoi("wat") // Parse functions return an error on bad input.
fmt.Println(e)
k, _ := strconv.Atoi("456") // `Atoi` is a convenienice function for `int` parsing.
println(k)
_, e := strconv.Atoi("wat") // Parse functions return an error on bad input.
fmt.Println(e)
}
/*