Skip to content

Commit 82909d0

Browse files
authored
fix: change error message (#95)
1 parent 29ca59d commit 82909d0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

command/config.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ const (
3232
)
3333

3434
var (
35-
errSrcIP = errors.New("invalid source IP")
36-
errSrcMAC = errors.New("invalid source MAC")
37-
errSrcInterface = errors.New("invalid source interface")
38-
errRateLimit = errors.New("invalid ratelimit")
39-
errTermStdin = errors.New("stdin is from a terminal")
40-
errIPFlags = errors.New("invalid ip flags")
41-
errNoDstIP = errors.New("requires one ip subnet argument or file with ip/port pairs")
42-
errARPStdin = errors.New("ARP cache and IP file can not be read from stdin at the same time")
35+
errSrcIP = errors.New("invalid source IP")
36+
errSrcMAC = errors.New("invalid source MAC")
37+
errSrcInterface = errors.New("invalid source interface")
38+
errRateLimit = errors.New("invalid ratelimit")
39+
errARPCacheStdin = errors.New("ARP cache is expected from file or stdin pipe")
40+
errIPFlags = errors.New("invalid ip flags")
41+
errNoDstIP = errors.New("requires one ip subnet argument or file with ip/port pairs")
42+
errARPStdin = errors.New("ARP cache and IP file can not be read from stdin at the same time")
4343
)
4444

4545
type packetScanCmdOpts struct {
@@ -279,7 +279,7 @@ func (o *ipScanCmdOpts) openARPCache() (r io.ReadCloser, err error) {
279279
// only data being piped to stdin is valid
280280
if (info.Mode() & os.ModeCharDevice) != 0 {
281281
// stdin from terminal is not valid
282-
return nil, errTermStdin
282+
return nil, errARPCacheStdin
283283
}
284284
r = io.NopCloser(os.Stdin)
285285
return

0 commit comments

Comments
 (0)