golang获取IP地址

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

  

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