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

x/tools/gopls: support converting array to slice when completing #40277

Open
muirdm opened this issue Jul 17, 2020 · 5 comments
Open

x/tools/gopls: support converting array to slice when completing #40277

muirdm opened this issue Jul 17, 2020 · 5 comments

Comments

@muirdm
Copy link

@muirdm muirdm commented Jul 17, 2020

When working with arrays you often need to convert them to slices. It would be nice if gopls offered completion candidates that did this for you:

package main

import "os"

func main() {
	var a [32]byte
	os.Stdout.Write(<>) // offer `a[:]` as a candidate
}
@gopherbot gopherbot added this to the Unreleased milestone Jul 17, 2020
@stamblerre stamblerre removed this from the Unreleased milestone Jul 17, 2020
@hasheddan
Copy link

@hasheddan hasheddan commented Aug 8, 2020

Happy to take this one if no one else is already working on it!

/cc @stamblerre @muirdm

@muirdm
Copy link
Author

@muirdm muirdm commented Aug 8, 2020

I'm not working on it. Happy to give pointers if needed!

@muirdm
Copy link
Author

@muirdm muirdm commented Aug 25, 2020

@hasheddan How is it going? Are you still tinkering with this?

@hasheddan
Copy link

@hasheddan hasheddan commented Aug 25, 2020

@muirdm I am still interested in tackling this, but was out of office last week so I haven't gotten to it yet. Would likely have time this weekend, but certainly understand if the team needs to go ahead and move forward :)

@muirdm
Copy link
Author

@muirdm muirdm commented Aug 25, 2020

No worries, take your time.

@stamblerre stamblerre added this to the gopls/unplanned milestone Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants