Skip to content

Commit

Permalink
change comment prefix to the %
Browse files Browse the repository at this point in the history
  • Loading branch information
likexian committed Apr 29, 2023
1 parent f1703c8 commit d8796a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/whois/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ func checkUpdate(updateMessage chan string, version string) {
if rsp.Emergency {
emergency = "WARNING"
}
message := fmt.Sprintf(";; %s: Your version of whois is outdate, the latest is %s.\n",
message := fmt.Sprintf("%% %s: Your version of whois is outdate, the latest is %s.\n",
emergency, rsp.Latest)
message += fmt.Sprintf(";; You can update it by downloading from %s", rsp.ProductURL)
message += fmt.Sprintf("%% You can update it by downloading from %s", rsp.ProductURL)
updateMessage <- message
}
}
Expand Down
5 changes: 3 additions & 2 deletions whois.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type Client struct {

// Version returns package version
func Version() string {
return "1.14.8"
return "1.15.0"
}

// Author returns package author
Expand Down Expand Up @@ -95,7 +95,7 @@ func (c *Client) SetTimeout(timeout time.Duration) {
func (c *Client) Whois(domain string, servers ...string) (result string, err error) {
start := time.Now()
defer func() {
result = fmt.Sprintf("%s\n\n;; Query time: %d msec\n;; WHEN: %s\n",
result = fmt.Sprintf("%s\n\n%% Query time: %d msec\n%% WHEN: %s\n",
strings.TrimRight(result, "\n"),
time.Since(start).Milliseconds(),
start.Format("Mon Jan 02 15:04:05 MST 2006"),
Expand Down Expand Up @@ -170,6 +170,7 @@ func (c *Client) rawQuery(domain, server, port string) (string, error) {
server = "whois.godaddy.com"
}

// See: https://github.com/likexian/whois/pull/30
if server == "porkbun.com/whois" {
server = "whois.porkbun.com"
}
Expand Down

0 comments on commit d8796a0

Please sign in to comment.