diff --git a/go/unpack.go b/go/unpack.go index 3ca4804..a375311 100644 --- a/go/unpack.go +++ b/go/unpack.go @@ -4,6 +4,7 @@ import ( "io" "os" "unsafe" + "strconv" "reflect" ) @@ -264,6 +265,8 @@ func unpack(reader io.Reader, reflected bool) (v reflect.Value, n int, err os.Er } nbytesread += n if e != nil { return nil, nbytesread, e } + default: + panic("unsupported code: " + strconv.Itoa(int(c))) } } return retval, nbytesread, nil