diff --git a/tests/test_arrays.txt b/tests/test_arrays.txt index 7943478..b2ebfc7 100644 --- a/tests/test_arrays.txt +++ b/tests/test_arrays.txt @@ -29,4 +29,10 @@ func main() { slice8, slice8 = []int{1,2,3,4}, []int{1,2,3,4}; + // создание с использованием make + list := make([]int, 0, 5); + fmt.Println(list); // [] + fmt.Println(len(list)); // 0 + fmt.Println(cap(list)); // 5 + } \ No newline at end of file