On Mon, Apr 13, 2020 at 6:56 PM Glen Huang <hey....@gmail.com> wrote:
>
> Given
>
> type Data []byte
> s := [][]byte{{1},{2}}
>
> I wonder why this conversion isn't allowed?
>
> []Data(s)
>
> Seems pretty straightforward. Maybe I miss some edge cases where things won't 
> square?

https://golang.org/doc/faq#convert_slice_with_same_underlying_type

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXWkTMJXuGg-2%2Bmndwz7SRfqnNap0-0Xv4gyjSo3TthKw%40mail.gmail.com.

Reply via email to