Conditions | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | package decode |
||
43 | func (err *FailedToReadSizeError) Error() string { |
||
44 | text := strings.Builder{} |
||
45 | text.WriteString("failed to read size") |
||
46 | |||
47 | if err.Previous == nil { |
||
48 | return text.String() |
||
49 | } |
||
50 | |||
51 | text.WriteString(": ") |
||
52 | text.WriteString(err.Previous.Error()) |
||
53 | |||
54 | return text.String() |
||
55 | } |
||
84 |