<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Interface on iMil.net</title>
		<link>http://imil.net/blog/tags/interface/</link>
		<description>Recent content in Interface on iMil.net</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Sun, 09 Dec 2018 11:10:32 +0000</lastBuildDate>
		
			<atom:link href="http://imil.net/blog/tags/interface/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Golang interfaces, a pragmatic explanation for the programmer</title>
				<link>http://imil.net/blog/posts/2018/golang-interfaces-a-pragmatic-explanation-for-the-programmer/</link>
				<pubDate>Sun, 09 Dec 2018 11:10:32 +0000</pubDate>
				<guid>http://imil.net/blog/posts/2018/golang-interfaces-a-pragmatic-explanation-for-the-programmer/</guid>
				<description>&lt;p&gt;I&amp;rsquo;m still in the process of learning &lt;a href=&#34;https://golang.org/&#34;&gt;golang&lt;/a&gt; the right way. Yes I already wrote some projects with the &lt;em&gt;Go&lt;/em&gt; language (&lt;a href=&#34;https://gitlab.com/iMil/js2sh&#34;&gt;here&lt;/a&gt; and &lt;a href=&#34;https://gitlab.com/iMil/collectd-ticker&#34;&gt;here&lt;/a&gt;), but I like to understand the real meaning of techniques when using them.&lt;br&gt;&#xA;One of what is said to be the most amazing features of &lt;em&gt;Go&lt;/em&gt; is &lt;a href=&#34;https://tour.golang.org/methods/9&#34;&gt;interfaces&lt;/a&gt;. Here&amp;rsquo;s what the official &lt;a href=&#34;https://golang.org/doc/effective_go.html#interfaces&#34;&gt;golang docs&lt;/a&gt; has to say about it:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Interfaces in Go provide a way to specify the behavior of an object: if something can do this, then it can be used here. We&amp;rsquo;ve seen a couple of simple examples already; custom printers can be implemented by a String method while Fprintf can generate output to anything with a Write method. Interfaces with only one or two methods are common in Go code, and are usually given a name derived from the method, such as io.Writer for something that implements Write.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
