delve
delve copied to clipboard
Unable to convert newtypes of slices to the primitive slice
package main
type Message []byte
func main() {
var x Message = []byte("abc")
println([]byte(x)) // line 7
}
(dlv) c main.go:7
(dlv) p []byte(x)
Command failed: can not convert "x" to []uint8
However, surprisingly, p string(x) prints "abc" correctly.