Code clean up
This commit is contained in:
@@ -33,7 +33,7 @@ const (
|
||||
// Errors
|
||||
var (
|
||||
ErrCommandRunUndefinedCommand = errors.New(
|
||||
"Undefined Command")
|
||||
"undefined Command")
|
||||
)
|
||||
|
||||
// Command represents a command handler machine builder
|
||||
|
||||
@@ -31,13 +31,13 @@ import (
|
||||
// Errors
|
||||
var (
|
||||
ErrHandlerUnknownHeaderType = errors.New(
|
||||
"Unknown command header type")
|
||||
"unknown command header type")
|
||||
|
||||
ErrHandlerControlMessageTooLong = errors.New(
|
||||
"Control message was too long")
|
||||
"control message was too long")
|
||||
|
||||
ErrHandlerInvalidControlMessage = errors.New(
|
||||
"Invalid control message")
|
||||
"invalid control message")
|
||||
)
|
||||
|
||||
// HandlerCancelSignal signals the cancel of the entire handling proccess
|
||||
@@ -113,11 +113,6 @@ type streamHandlerSender struct {
|
||||
sendDelay time.Duration
|
||||
}
|
||||
|
||||
// signal sends handler signal
|
||||
func (h streamHandlerSender) signal(hd Header, d []byte, buf []byte) error {
|
||||
return h.handlerSender.signal(hd, d, buf)
|
||||
}
|
||||
|
||||
// Write sends data
|
||||
func (h streamHandlerSender) Write(b []byte) (int, error) {
|
||||
defer time.Sleep(h.sendDelay)
|
||||
|
||||
@@ -28,16 +28,16 @@ import (
|
||||
// Errors
|
||||
var (
|
||||
ErrStreamsInvalidStreamID = errors.New(
|
||||
"Stream ID is invalid")
|
||||
"stream ID is invalid")
|
||||
|
||||
ErrStreamsStreamOperateInactiveStream = errors.New(
|
||||
"Specified stream was inactive for operation")
|
||||
"specified stream was inactive for operation")
|
||||
|
||||
ErrStreamsStreamClosingInactiveStream = errors.New(
|
||||
"Closing an inactive stream is not allowed")
|
||||
"closing an inactive stream is not allowed")
|
||||
|
||||
ErrStreamsStreamReleasingInactiveStream = errors.New(
|
||||
"Releasing an inactive stream is not allowed")
|
||||
"releasing an inactive stream is not allowed")
|
||||
)
|
||||
|
||||
// StreamError Stream Error signal
|
||||
|
||||
Reference in New Issue
Block a user