Can somebody help to convert my ruby code to Go. Kindly refer to my ruby code below.
query= "test"
request = Net::HTTP::Post.new(url)
request.body = query
response = Net::HTTP.new(host, post).start{|http http.request(request)}
to Go.
You seem to want to POST a query, which would be similar to this answer:
Replace "
text/plain
" with "application/json
" if your query is a JSON one.