Skip to content

Commit 7c20964

Browse files
committed
fix linting
1 parent 4502961 commit 7c20964

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

node.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,8 @@ func (n *Node) WriteFrameExcept(exceptChannel *Channel, fr frame.Frame) error {
602602
// SendCommandLong sends a COMMAND_LONG and waits for COMMAND_ACK response.
603603
func (n *Node) SendCommandLong(command *common.MessageCommandLong, options *CommandOptions) (*CommandResponse, error) {
604604
if n.nodeCommand == nil {
605-
return nil, fmt.Errorf("command manager not available (COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
605+
return nil, fmt.Errorf("command manager not available " +
606+
"(COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
606607
}
607608

608609
return n.sendCommand(
@@ -617,7 +618,8 @@ func (n *Node) SendCommandLong(command *common.MessageCommandLong, options *Comm
617618
// SendCommandInt sends a COMMAND_INT and waits for COMMAND_ACK response.
618619
func (n *Node) SendCommandInt(command *common.MessageCommandInt, options *CommandOptions) (*CommandResponse, error) {
619620
if n.nodeCommand == nil {
620-
return nil, fmt.Errorf("command manager not available (COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
621+
return nil, fmt.Errorf("command manager not available " +
622+
"(COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
621623
}
622624

623625
return n.sendCommand(

node_command.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ const (
2222
defaultCommandTimeout = 5 * time.Second
2323
)
2424

25-
var (
26-
errNodeTerminated = errors.New("node terminated")
27-
)
25+
var errNodeTerminated = errors.New("node terminated")
2826

2927
func findPendingCommand(
3028
pending map[commandKey]*pendingCommand,

node_command_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,8 @@ func TestNodeCommandWithoutDialect(t *testing.T) {
515515
Timeout: 1 * time.Second,
516516
})
517517

518-
require.EqualError(t, err, "command manager not available (COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
518+
require.EqualError(t, err, "command manager not available "+
519+
"(COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
519520
}
520521

521522
// TestNodeCommandMultipleSimultaneous tests multiple commands in flight
@@ -1020,7 +1021,8 @@ func TestNodeCommandIntNotAvailable(t *testing.T) {
10201021
Timeout: 1 * time.Second,
10211022
})
10221023

1023-
require.EqualError(t, err, "command manager not available (COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
1024+
require.EqualError(t, err, "command manager not available "+
1025+
"(COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
10241026
}
10251027

10261028
// TestNodeCommandLongNotAvailable tests SendCommandLong when COMMAND_LONG not in dialect
@@ -1062,7 +1064,8 @@ func TestNodeCommandLongNotAvailable(t *testing.T) {
10621064
Timeout: 1 * time.Second,
10631065
})
10641066

1065-
require.EqualError(t, err, "command manager not available (COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
1067+
require.EqualError(t, err, "command manager not available "+
1068+
"(COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
10661069
}
10671070

10681071
// TestNodeCommandAckWithExtensionFields tests that extension fields are properly handled

node_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,5 +781,6 @@ func TestNodeCommandManagerNotInitialized(t *testing.T) {
781781
Timeout: 1 * time.Second,
782782
})
783783

784-
require.EqualError(t, err, "command manager not available (COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
784+
require.EqualError(t, err, "command manager not available "+
785+
"(COMMAND_LONG, COMMAND_INT or COMMAND_ACK missing from dialect)")
785786
}

0 commit comments

Comments
 (0)