File tree 1 file changed +5
-12
lines changed
1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -827,7 +827,11 @@ func (f *framer) writeTo(w io.Writer) error {
827
827
}
828
828
829
829
func (f * framer ) readTrace () {
830
- f .traceID = f .readUUID ().Bytes ()
830
+ if len (f .buf ) < 16 {
831
+ panic (fmt .Errorf ("not enough bytes in buffer to read trace uuid require 16 got: %d" , len (f .buf )))
832
+ }
833
+ copy (f .traceID , f .buf [:16 ])
834
+ f .buf = f .buf [16 :]
831
835
}
832
836
833
837
type readyFrame struct {
@@ -1861,17 +1865,6 @@ func (f *framer) readLongString() (s string) {
1861
1865
return
1862
1866
}
1863
1867
1864
- func (f * framer ) readUUID () * UUID {
1865
- if len (f .buf ) < 16 {
1866
- panic (fmt .Errorf ("not enough bytes in buffer to read uuid require %d got: %d" , 16 , len (f .buf )))
1867
- }
1868
-
1869
- // TODO: how to handle this error, if it is a uuid, then sureley, problems?
1870
- u , _ := UUIDFromBytes (f .buf [:16 ])
1871
- f .buf = f .buf [16 :]
1872
- return & u
1873
- }
1874
-
1875
1868
func (f * framer ) readStringList () []string {
1876
1869
size := f .readShort ()
1877
1870
You can’t perform that action at this time.
0 commit comments