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 · 0 comments
Open

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

muirdm opened this issue Jul 17, 2020 · 0 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
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
3 participants
You can’t perform that action at this time.