From 38386091ec4a337b27cdc33f7d2100551e162090 Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Thu, 27 Aug 2015 16:17:44 +0200 Subject: [PATCH] Fix typos in c2.4 of the English version --- en/02.4.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/en/02.4.md b/en/02.4.md index 37475678..d28a5358 100644 --- a/en/02.4.md +++ b/en/02.4.md @@ -133,9 +133,9 @@ Let's see one example. ![](images/2.4.student_struct.png?raw=true) -Figure 2.7 Inheritance in Student and Human +Figure 2.7 Embedding in Student and Human -We see that we can access the age and name fields in Student just like we can in Human. This is how embedded fields work. It's very cool, isn't it? Hold on, there's something cooler! You can even use Student to access Human in this embedded field! +We see that we can access the `age` and `name` fields in Student just like we can in Human. This is how embedded fields work. It's very cool, isn't it? Hold on, there's something cooler! You can even use Student to access Human in this embedded field! mark.Human = Human{"Marcus", 55, 220} mark.Human.age -= 1 @@ -176,7 +176,7 @@ All the types in Go can be used as embedded fields. fmt.Println("Her skills now are ", jane.Skills) // modify embedded field jane.int = 3 - fmt.Println("Her preferred number is", jane.int) + fmt.Println("Her preferred number is ", jane.int) } In the above example, we can see that all types can be embedded fields and we can use functions to operate on them.