Skip to content

Instantly share code, notes, and snippets.

@yu81
Created December 2, 2017 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yu81/d4913af295a4374101f619315a177de3 to your computer and use it in GitHub Desktop.
Save yu81/d4913af295a4374101f619315a177de3 to your computer and use it in GitHub Desktop.
arpa, err := reverseaddr("256.0.0.1") // IPアドレスとして解釈してはいけないのでエラーであることを期待
if dnsErr, ok := err.(*DNSError); ok {
// DNS関連のエラーであることを前提とした処理・ログ出力等
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment