The size(N) of the array is unknown in advance, the value is retrieved dynamically in the process of accessing a third-party service, how can such a slice be created?
data := make([][N]byte, maxEntries)
I tried to do something like this but it was not successful:
a := make([]byte, N)
for i := range a {
a[i] = make([]byte, N)
}
New contributor
Наталья Захарова is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.