Update 02.6.md
fix typo
This commit is contained in:
@@ -268,7 +268,7 @@ interface的变量可以持有任意实现该interface类型的对象,这给
|
||||
} else if value, ok := element.(Person); ok {
|
||||
fmt.Printf("list[%d] is a Person and its value is %s\n", index, value)
|
||||
} else {
|
||||
fmt.Println("list[%d] is of a different type", index)
|
||||
fmt.Printf("list[%d] is of a different type\n", index)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user