golang获取IP地址

ip:=this.Ctx.Request.RemoteAddr
ip=ip[0:strings.LastIndex(ip, ":")]

  

posted @ 2018-01-25 23:10  换行程序员  阅读(3970)  评论(0编辑  收藏  举报