Debian Codegraph @

cmd/whois/main.go

raw symbols SCIP
1 package main
2
3 import (
4 "fmt"
5 "os"
6
7 "github.com/TwiN/whois"
8 )
9
10 func main() {
11 if len(os.Args) != 2 {
12 _, _ = fmt.Fprintln(os.Stderr, "you must provide exactly one domain")
13 os.Exit(1)
14 return
15 }
16 output, err := whois.NewClient().Query(os.Args[1])
17 if err != nil {
18 _, _ = fmt.Fprintln(os.Stderr, err.Error())
19 os.Exit(1)
20 }
21 fmt.Println(output)
22 }