摘要: package main import "fmt" type gameObject struct { name string } func (o *gameObject) Name() string{ return o.name } func (o *gameObject) Attack() { f 阅读全文
posted @ 2018-12-25 13:31 small_lei_it 阅读(329) 评论(0) 推荐(0) 编辑
摘要: func interface2String(inter interface{}) { switch inter.(type) { case string: fmt.Println("string", inter.(string)) break case int: fmt.Println("int", 阅读全文
posted @ 2018-12-25 13:15 small_lei_it 阅读(3540) 评论(0) 推荐(0) 编辑