Golang中interface{}做爲函數參數和函數返回值的使用

Golang中interface{}做爲函數參數和函數返回值的使用 下面給出一個例子: package main import ( "errors" "fmt" ) type item struct { Name string } func (i item) String() string { return fmt.Sprintf("item name: %v
相關文章
相關標籤/搜索