Skip to content

Commit

Permalink
Use affirmative property over negative for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
robgonnella committed Jan 12, 2024
1 parent 533a721 commit 18c0d25
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (r *Results) MarshalJSON() ([]byte, error) {
type Core struct {
arpOnly bool
printJSON bool
noProgress bool
progressEnabled bool
outFile string
portLen int
results *Results
Expand Down Expand Up @@ -114,7 +114,7 @@ func (c *Core) Initialize(
c.portLen = portLen
c.arpProgress = newProgressBar(targetLen, "performing arp scan")
c.synProgress = newProgressBar(1, "performing syn scan")
c.noProgress = noProgress
c.progressEnabled = !noProgress
c.arpOnly = arpOnly
c.printJSON = printJSON
c.outFile = outFile
Expand All @@ -124,7 +124,7 @@ func (c *Core) Initialize(
func (c *Core) Run() error {
start := time.Now()

if !c.noProgress {
if c.progressEnabled {
go c.monitorRequestNotifications()
}

Expand Down Expand Up @@ -233,7 +233,7 @@ func (c *Core) processArpDone() {

c.printArpResults()

if !c.noProgress && !c.arpOnly && len(c.results.Devices) > 0 {
if c.progressEnabled && !c.arpOnly && len(c.results.Devices) > 0 {
size := len(c.results.Devices) * c.portLen
c.synProgress.ChangeMax(size)
}
Expand Down Expand Up @@ -262,7 +262,7 @@ func (c *Core) printArpResults() {
}()
}

if !c.noProgress {
if c.progressEnabled {
fmt.Println(string(data))
}

Expand Down

0 comments on commit 18c0d25

Please sign in to comment.