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/text/search: WholeWord and Exact options are nil #16863

Open
zombiezen opened this issue Aug 24, 2016 · 2 comments
Open

x/text/search: WholeWord and Exact options are nil #16863

zombiezen opened this issue Aug 24, 2016 · 2 comments
Assignees
Milestone

Comments

@zombiezen
Copy link
Contributor

@zombiezen zombiezen commented Aug 24, 2016

  1. What version of Go are you using (go version)?
    go1.7
  2. What operating system and processor architecture are you using (go env)?
    linux/amd64
  3. What did you do?
    https://play.golang.org/p/GNfQa_7pq3
  4. What did you expect to see?
    -1, -1
  5. What did you see instead?
panic: runtime error: invalid memory address or nil pointer dereference
[snip]
    $GOPATH/src/golang.org/x/text/search/search.go:82
[snip]

This is perhaps a case of "I didn't read the var definition carefully enough", but having exported symbols that crash is unfortunate.

@mpvl
Copy link
Contributor

@mpvl mpvl commented Aug 24, 2016

Both WholeWord and Exact are "not yet implemented". I could make it panic for now as such instead of simply letting it be a nil function.

How badly do you need this functionality?

@zombiezen
Copy link
Contributor Author

@zombiezen zombiezen commented Aug 24, 2016

Not very, it was just surprising to me and I couldn't find an existing issue for it. All in all, the whole text repo is great. 👍

@quentinmit quentinmit added this to the Unreleased milestone Sep 6, 2016
@quentinmit quentinmit added this to the Unreleased milestone Sep 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants