Quidest?

Go Arrays

· Lorenzo Drumond

The type [n]T is an array of n values of type T.

The expression

1var a [10]int

declares a variable a as an array of ten integers.

An array’s length is part of its type, so arrays cannot be resized.

An array literal is declared as:

1names := [4]string{"John", "Paul", "George", "Ringo"}

References

Next -> go-slices Next -> go-slices-as-reference-to-arrays

#array #data #length #go #golang #type #structured #fixed