Keep variable name consistency

This commit is contained in:
f440
2015-11-23 18:02:57 +09:00
committed by James Miranda
parent ae5ccef096
commit de1aff92e2

View File

@@ -138,7 +138,7 @@ Like the above example, if we define a variable "m" as interface Men, then any o
mike := Student{Human{"Mike", 25, "222-222-XXX"}, "MIT", 0.00}
paul := Student{Human{"Paul", 26, "111-222-XXX"}, "Harvard", 100}
sam := Employee{Human{"Sam", 36, "444-222-XXX"}, "Golang Inc.", 1000}
Tom := Employee{Human{"Sam", 36, "444-222-XXX"}, "Things Ltd.", 5000}
tom := Employee{Human{"Sam", 36, "444-222-XXX"}, "Things Ltd.", 5000}
// define interface i
var i Men
@@ -150,7 +150,7 @@ Like the above example, if we define a variable "m" as interface Men, then any o
i.Sing("November rain")
//i can store Employee
i = Tom
i = tom
fmt.Println("This is Tom, an Employee:")
i.SayHi()
i.Sing("Born to be wild")