Skip to content

Commit

Permalink
finished progress bar upon completion
Browse files Browse the repository at this point in the history
  • Loading branch information
caffix committed Feb 11, 2024
1 parent 9e4ed2f commit 9ae7d95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/amass/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ func runEnumCommand(clArgs []string) {
}
}

progress := pb.Start64(int64(count))
done := make(chan struct{})
progress := pb.Start64(int64(count))
go func() {
var finished int
t := time.NewTicker(2 * time.Second)
Expand All @@ -207,6 +207,7 @@ func runEnumCommand(clArgs []string) {
finished++
if finished == 5 {
close(done)
return
}
} else {
finished = 0
Expand All @@ -219,7 +220,6 @@ func runEnumCommand(clArgs []string) {
}
}
}()
// Terminate client session
loop:
for {
select {
Expand All @@ -229,7 +229,7 @@ loop:
close(done)
}
}
fmt.Fprintf(color.Error, "\n%s\n", green("The enumeration has finished"))
progress.Finish()
}

func argsAndConfig(clArgs []string) (*config.Config, *enumArgs) {
Expand Down

0 comments on commit 9ae7d95

Please sign in to comment.