Skip to content

reflect: MakeArray #7239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gopherbot opened this issue Jan 30, 2014 · 2 comments
Closed

reflect: MakeArray #7239

gopherbot opened this issue Jan 30, 2014 · 2 comments

Comments

@gopherbot
Copy link
Contributor

by bprosnitz@google.com:

Feature request:

It would be nice to have MakeArray(elem Type, len int) Type in the reflect package.

Currently, it is not possible to construct array types from a description without
already having a reference to it. This would be useful to be able to do for certain
networking applications.
@ianlancetaylor
Copy link
Member

Comment 1:

This is mostly done and is in the code as reflect.arrayOf.  It is not exported because
it does not yet set the alg and gc fields, which means that the arrays constructed from
that type will not work as map keys and they will not be garbage collected correctly. 
If somebody wants to work on finishing that off, that would be great.

Status changed to Duplicate.

Merged into issue #5996.

@gopherbot
Copy link
Contributor Author

Comment 2 by bprosnitz@google.com:

Change to fill in the remaining fields https://golang.org/cl/59250043

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants