thanks for looking at my post. i need to create an Linux instance with go lang and display the created public IP on the webpage.
Actually this is well hidden in the API docs. First you need to get an Google Cloud SDK Client authenticated. Then you might want to look at the following API operations:
You should look at http://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/making-requests.html and then calling DescribeInstances
(https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html), should give you the public IP address.
Some pointers which may help here (haven't used these): https://gist.github.com/stephen-mw/9f289d724c4cfd3c88f2 and http://www.heystephenwood.com/search/label/aws
Hope this helps.