如何在Golang节俭服务器中获取客户端的IP

I'm writing a thrift service in golang and I would like to understand how I can get the client's IP address in the handler functions context.

Thanks, Love.

I think you're using this Godoc Thrift library. It would be good to have code snippets in your question; such as type of thrift server, handler definition, etc.

As per Thrift Go library doc-

func (p *TSocket) Addr() net.Addr

Returns the remote address of the socket.

So if you have access to TSocket then you can get remote address.