Reword error message when no stream is found

This commit is contained in:
Ullaakut
2020-05-04 07:58:43 +02:00
committed by Brendan Le Glaunec
parent defc308a9d
commit 9f05634531
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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"),
},
}