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

container/list: MoveBefore/After would be useful #4940

Closed
rogpeppe opened this issue Feb 28, 2013 · 4 comments
Closed

container/list: MoveBefore/After would be useful #4940

rogpeppe opened this issue Feb 28, 2013 · 4 comments
Milestone

Comments

@rogpeppe
Copy link
Contributor

Currently there's no way of moving a list element to
an arbitrary place in the list without removing it
and using InsertBefore/After.

It's useful to be able to have external data structures
pointing at list elements that can move around arbitrarily,
so I suggest two new List methods:

// MoveAfter moves the element immediately after mark.
func (l *List) MoveAfter(e, mark *Element)

// MoveBefore moves the element immediately before mark.
func (l *List) MoveBefore(e, mark *Element)
@rsc
Copy link
Contributor

rsc commented Mar 12, 2013

Comment 1:

[The time for maybe has passed.]

Labels changed: removed go1.1maybe.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 2:

Labels changed: added go1.2maybe, feature.

Status changed to Accepted.

@PieterD
Copy link
Contributor

PieterD commented Jul 31, 2013

Comment 3:

I submitted a CL for this:
https://golang.org/cl/12021044/

@griesemer
Copy link
Contributor

Comment 4:

This issue was closed by revision fbcc24b.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@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

5 participants