<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Buffer on Gopher Coding</title><link>https://gophercoding.com/tags/buffer/</link><description>Recent content in Buffer on Gopher Coding</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 02 Apr 2023 12:13:48 +0100</lastBuildDate><atom:link href="https://gophercoding.com/tags/buffer/index.xml" rel="self" type="application/rss+xml"/><item><title>Convert an io.ReadCloser to String</title><link>https://gophercoding.com/convert-readcloser-to-string/</link><pubDate>Sat, 01 Oct 2022 07:00:00 +0000</pubDate><guid>https://gophercoding.com/convert-readcloser-to-string/</guid><description>&lt;p>Using Go, we often make HTTP calls these days using &lt;code>net/http&lt;/code>, which result in a response of type &lt;code>io.ReadCloser&lt;/code>&amp;hellip; which are hard to read for the layman (like me). What we really want to the response in the form of &lt;strong>a string which we can read&lt;/strong>. This post will talk about how to convert these &lt;strong>ReadCloser&lt;/strong> into strings.&lt;/p>
&lt;p>First we&amp;rsquo;ll look at the problem, then we have two different solutions.&lt;/p></description></item></channel></rss>