interface{} で数を取得 -> reflect.ValueOf(t).Len()

wakuworkswakuworks のブックマーク 2015/01/24 12:06

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

range over interface{} which stores a slice

    Given the scenario where you have a function which accepts t interface{}. If it is determined that the t is a slice, how do I range over that slice? func main() { data := []string{"one","two","thre...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう