Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

实例代码和标题不符合 #191

Open
wuyingsong opened this issue May 27, 2014 · 1 comment
Open

实例代码和标题不符合 #191

wuyingsong opened this issue May 27, 2014 · 1 comment

Comments

@wuyingsong
Copy link

标题是LookupAddr,实例演示的是JoinHostPort

@lomoalbert
Copy link
Contributor

func LookupAddr(addr string) (name []string, err error)

参数列表

  • addr 地址字符串

返回列表

  • name 主机名列表
  • err 错误信息

功能说明

  • 通过IP地址查询域名列表

代码实例:

package main

import "fmt"
import "net"

func main() {
    names := net.LookupAddr("173.194.127.81")
    fmt.Println(addr)
}

代码输出:

[hkg03s11-in-f17.1e100.net.]
<nil>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants