Skip to content

Commit

Permalink
fix: change error message (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
v-byte-cpu committed Jul 12, 2021
1 parent 29ca59d commit 82909d0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions command/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ const (
)

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

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

0 comments on commit 82909d0

Please sign in to comment.