Skip to content
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

text/template: map key sorting should know about the sort interface #5020

Closed
robpike opened this issue Mar 9, 2013 · 1 comment
Closed

Comments

@robpike
Copy link
Contributor

robpike commented Mar 9, 2013

Now that reflect.SliceOf exists, it's conceivable that key sorting for maps in
text.Template could be craftier: if the a slice of key types is sortable, it could
promote to a sortable slice and sort them.

The user can do this by hand already, of course, but it might be nice to be automatic
about it. Low priority.
@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 1:

The slice of key types K is []K, which has no methods and so cannot implement
sort.Interface.

Status changed to Invalid.

@golang golang locked and limited conversation to collaborators Jun 24, 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

3 participants