Interface
型変換
型変換はシンプルに(変換したい型)で変換できる
code: interface.go
var i = interface{}
i = "string"
_, ok := i.(string)
// ok == true
i = mapstringinterface{}{
"foo": 1,
"bar": "zero",
}
_, ok := i.(mapstringinterface{})
// ok == true