@raviteja aketi I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to "Accept" the answer.
Issue:
You were getting below error for your Go language azure function where you were trying to hit the endpoint from postman or testing it from azure portal function app code+test blade.
Full Exception : Exception while executing function /Functions.FunctionTwo ---> System.Net.Http.HttpRequestException /Connection refused (127.0.0.1:41435) ---> System.Net.Sockets.SocketException /Connection refused System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error,CancellationToken cancellationToken) System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) async System.Net.Sockets.Socket.
Solution:
You found the previous discussion here and found the root cause of the issue. You were building the binary and uploading the zip file manually by using az commands from my your mac machibe but your chosen server was Linux. You found that you should build it for Linux environment. For example GOOS=linux GOARCH=amd64 go build handler.go
Thank you again for your time and patience throughout this issue.