Adding upstream version 1.1.10.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
0935a35f2a
commit
504a5578e5
12 changed files with 537 additions and 0 deletions
22
cmd/whois/main.go
Normal file
22
cmd/whois/main.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/TwiN/whois"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if len(os.Args) != 2 {
|
||||
_, _ = fmt.Fprintln(os.Stderr, "you must provide exactly one domain")
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
output, err := whois.NewClient().Query(os.Args[1])
|
||||
if err != nil {
|
||||
_, _ = fmt.Fprintln(os.Stderr, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Println(output)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue