From 9f05634531a008fdadff133cca0688e5720158a7 Mon Sep 17 00:00:00 2001 From: Ullaakut Date: Mon, 4 May 2020 07:58:43 +0200 Subject: [PATCH] Reword error message when no stream is found --- attack.go | 2 +- attack_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/attack.go b/attack.go index 6933022..de05c25 100644 --- a/attack.go +++ b/attack.go @@ -24,7 +24,7 @@ const ( // Attack attacks the given targets and returns the accessed streams. func (s *Scanner) Attack(targets []Stream) ([]Stream, error) { if len(targets) == 0 { - return nil, fmt.Errorf("unable to attack empty list of targets") + return nil, fmt.Errorf("no stream found") } // Most cameras will be accessed successfully with these two attacks. diff --git a/attack_test.go b/attack_test.go index afa665b..008fe43 100644 --- a/attack_test.go +++ b/attack_test.go @@ -89,7 +89,7 @@ func TestAttack(t *testing.T) { targets: nil, expectedStreams: nil, - expectedErr: errors.New("unable to attack empty list of targets"), + expectedErr: errors.New("no stream found"), }, }