golang get array length at runtime code example Example: how to get the length of an array in go array:=[]int {1,2,3,4} len(array)