-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
proposal: spec: byte view: type that can represent a []byte or string #5376
Comments
The discussion of this is at https://groups.google.com/d/msg/golang-dev/Y7j4B2r_eDw/Ovu7WbSzlOUJ. |
Certain implementations of generics (#15292) would provide this. But not all--it's possible to imagine generics proposals that do not support this. |
Putting on hold until we have some more experience with generics. |
Update: I wrote go4.org/mem which I'm now happily using in a number of places. |
Everyone was forced to do something like this for ages... https://godoc.org/lab.nexedi.com/kirr/go123/mem#String |
@navytux, the difference is that go4.org/mem doesn't let callers do unsafe things. |
@bradfitz, indeed, thanks for feedback. |
The text was updated successfully, but these errors were encountered: