fix unreachable code & missing stringer-generated code

This commit is contained in:
Christian Schwarz
2017-09-30 16:31:55 +02:00
parent 6199595602
commit 0cbee78b40
12 changed files with 53 additions and 24 deletions

View File

@ -26,6 +26,7 @@ const (
FrameTypeRST FrameType = 0xff
)
//go:generate stringer -type=Status
type Status uint64
const (
@ -154,7 +155,7 @@ func (w *frameBridgingWriter) writeUntilFrameFull(b []byte) (n int, err error) {
return
}
if w.bytesLeftToLimit == 0 {
err = errors.Errorf("exceeded limit of total %v bytes for this message")
err = errors.Errorf("message exceeds max number of allowed bytes")
return
}
maxwrite := len(b)