-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implementing whois query and layout, adding concurrency in a bunch of…
… places
- Loading branch information
1 parent
95a5b5b
commit ce1c2f1
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package main | ||
|
||
import ( | ||
"sync" | ||
) | ||
|
||
func RunConcurrently(tasks ...func()) { | ||
var wg sync.WaitGroup | ||
wg.Add(len(tasks)) | ||
|
||
for _, task := range tasks { | ||
go func(t func()) { | ||
defer wg.Done() | ||
t() | ||
}(task) | ||
} | ||
|
||
wg.Wait() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{template "base" .}} | ||
|
||
{{define "content"}} | ||
<div class="container-fluid"> | ||
<div class="row"> | ||
<div class="col"> | ||
<div class="card bg-dark text-light mb-4"> | ||
<div class="card-body"> | ||
<div class="card-header bg-success"> | ||
<h5><i class="bi bi-search"></i> WHOIS Information</h5> | ||
</div> | ||
<div class="mt-3"> | ||
<p class="text-break">{{.WhoisInfo}}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{end}} |