Use "conversion" instead of "cast", per spec

Closes #200
This commit is contained in:
Mark McGranaghan
2019-05-31 12:45:42 -07:00
parent d351883ab8
commit 2d9b204571
12 changed files with 26 additions and 26 deletions

View File

@@ -85,14 +85,14 @@ func main() {
fmt.Println(dat)
// In order to use the values in the decoded map,
// we'll need to cast them to their appropriate type.
// For example here we cast the value in `num` to
// we'll need to convert them to their appropriate type.
// For example here we convert the value in `num` to
// the expected `float64` type.
num := dat["num"].(float64)
fmt.Println(num)
// Accessing nested data requires a series of
// casts.
// conversions.
strs := dat["strs"].([]interface{})
str1 := strs[0].(string)
fmt.Println(str1)

View File

@@ -1,2 +1,2 @@
43e8d66fb862ea224994ca766e5689a96016f7ca
UGeNKd-cw34
d4dc2281f64061f077d8f1e9687538f41a339b25
xC6SHbzGBZC