Keep variable name consistency

This commit is contained in:
f440
2015-11-23 18:02:57 +09:00
parent 71d146b2b2
commit e7aff408a7
5 changed files with 12 additions and 12 deletions

View File

@@ -142,7 +142,7 @@ interface类型定义了一组方法如果某个对象实现了某个接口
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{"Tom", 37, "222-444-XXX"}, "Things Ltd.", 5000}
tom := Employee{Human{"Tom", 37, "222-444-XXX"}, "Things Ltd.", 5000}
//定义Men类型的变量i
var i Men
@@ -154,8 +154,8 @@ interface类型定义了一组方法如果某个对象实现了某个接口
i.Sing("November rain")
//i也能存储Employee
i = Tom
fmt.Println("This is Tom, an Employee:")
i = tom
fmt.Println("This is tom, an Employee:")
i.SayHi()
i.Sing("Born to be wild")