我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何使用go编程语言在给定ip地址的情况下在网络上查找主机名

Using go programming language, I'm able to find the IP address given the host name, but what I'm looking for is to find the host name given the ip address. I tried researching the "net" package, but no luck.

Is this something possible in golang? please advice.

LookupAddr should do what you are looking for:

LookupAddr performs a reverse lookup for the given address, returning a list of names mapping to that address.

近期文章

  • 如果在const定义中声明并使用了自定义类型,Godoc将不会生成“ const”字段?
  • Go / Golang sqlite查询不返回任何行
  • 如何在Windows中使用Go将进程设置为CPU?
  • 使用sql.Open进入SQLite3数据库连接
  • 去反映字段索引-单个索引与切片
  • 关闭频道与发送频道 一个空的结构?
  • 去获取系统:textflag.h丢失
  • 多行共享代码[重复]
  • 重写MS堆栈:jQuery / C#/ SQL Server
  • 在Go中调用嵌入式类型重载方法的正确方法
  • DNS查询是什么样的?
  • 标志已重新定义-通过youtube数据API 3中的键进行紧急搜索
  • 使用并发的Golang装配线
  • 使用mgo.Marshal()编组指针
  • Gotype命令未随Go一起安装?
  • 如何在同一应用程序中使用多个.go文件
  • 如何通知频道发送者退出golang?
  • 谁进行垃圾收集工作?
  • 使用golang present包运行ruby或python代码
  • Golang类型别名(类型SampleType otherType!== otherType)?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华