package main import ( "fmt" "reflect" ) func main() { var a = [3]int{1,2,3} var b []int fmt.Println(reflect.TypeOf(a)) // [3]int fmt.Println(reflect.TypeOf(b)) // []int fmt.Printf("%T",a) // [3]int fmt.Printf("%T",b) // []int }
posted on 2021-04-15 10:54 二十四岁半 阅读(58) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 二十四岁半 Powered by .NET 8.0 on Kubernetes