2019-10-05 16:12:52 +03:00

13 lines
427 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Обратите внимание, что массивы отображаются в виде
# [v1 v2 v3 ...] при выводе с помощью fmt.Println.
$ go run arrays.go
emp: [0 0 0 0 0]
set: [0 0 0 0 100]
get: 100
len: 5
dcl: [1 2 3 4 5]
2d: [[0 1 2] [1 2 3]]
# В Go вы будете встречать _срезы_ гораздо чаще, чем
# массивы. Срезы рассмотрим далее