<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>writer on Golang</title><link>https://golang.k5kc.com/tags/writer/</link><description>Recent content in writer on Golang</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sun, 16 Aug 2020 00:10:00 +0530</lastBuildDate><atom:link href="https://golang.k5kc.com/tags/writer/index.xml" rel="self" type="application/rss+xml"/><item><title>io.Writer interface</title><link>https://golang.k5kc.com/2020/08/16/io-writer-interface/</link><pubDate>Sun, 16 Aug 2020 00:10:00 +0530</pubDate><guid>https://golang.k5kc.com/2020/08/16/io-writer-interface/</guid><description>The inverse of io.Reader is io.Writer interface:
type Writer interface { Write(p []byte) (n int, err error) } Compared to io.Reader, since you no need to consider io.EOF error, the process of Write method is simple:
(1) err == nil: All the data in p is written successfully;
(2) err != nil: The data in p is partially or not written at all.
Let&amp;rsquo;s see an example:
package main import ( &amp;#34;log&amp;#34; &amp;#34;os&amp;#34; ) func main() { f, err := os.</description></item></channel></rss>