Declaration
func New(length int, capicity int) List<object>
go
Parameters
Input
Name | Type | Description |
---|---|---|
Length | Int | The initial length of the list, must be less than or equal to the initial capacity |
Capacity | Int | The initial capacity of the list, must be greater than or equal to the initial length. The capacity can be expanded dynamically, but doing so will consume some performance. It is recommended to set an appropriate value upon construction |
Return
Type | Description |
---|---|
List | Created list |