Golang News http://golangnews.com Jobs, Code, Videos and News for Go hackers - everything about the go programming language Mon, 19 Jun 2017 06:09:00 +0000 Code: Golang Pros & Cons (Part 2 of 6): Interface Implementation & Public/Private Designations <h3 id="golang-pro-interface-implementation">Golang Pro: Interface Implementation</h3> <p>Go’s automagic interface implementation is simply amazing. The number one reason we love it is because it saves us from <a href="http://disfunksioneel.blogspot.com/2011/04/linux-software-dependencies.html" target="_blank" style="box-sizing: border-box; background-image: initial; background-position: 0px 0px; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; color: rgb(34, 54, 83); border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; cursor: pointer; -webkit-tap-highlight-color: transparent;">dependency hell</a>.</p><h3 id="how-interfaces-work-in-golang">How Interfaces Work in Golang</h3> <p>Unlike most languages, interfaces in Golang are implemented automatically by structs that match the interface definition. Here’s a simple example. Notice the distinct lack of the <strong style="box-sizing: border-box; background: 0px 0px; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">implements</strong> keyword on the <code class="highlighter-rouge" style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 15.3px; padding: 0px; color: rgb(199, 37, 78); background: 0px 0px; border-radius: 4px; border: 0px; margin: 0px; outline: 0px; vertical-align: baseline;">Dog</code> and <code class="highlighter-rouge" style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 15.3px; padding: 0px; color: rgb(199, 37, 78); background: 0px 0px; border-radius: 4px; border: 0px; margin: 0px; outline: 0px; vertical-align: baseline;">Cat</code> struct.</p> <p><a href="http://Golang Pro: Interface Implementation Go’s automagic interface implementation is simply amazing. The number one reason we love it is because it saves us from dependency hell. How Interfaces Work in Golang Unlike most languages, interfaces in Golang are implemented automatically by structs that match the interface definition. Here’s a simple example. Notice the distinct lack of the implements keyword on the Dog and Cat struct."<a href="https://blog.bluematador.com/posts/golang-pros-cons-for-devops-part-2/?utm_source=golangnews&utm_medium=link&utm_campaign=golang-pros-cons-2">Read more</a></p> 6 points posted by Philip Volmar https://blog.bluematador.com/posts/golang-pros-cons-for-devops-part-2/?utm_source=golangnews&utm_medium=link&utm_campaign=golang-pros-cons-2 2314 Tue, 13 Jun 2017 20:20:00 +0000 Golang Pros & Cons for DevOps: Goroutines, Channels, Panics, and Errors This is the first part of a series we're publishing on the pros and cons of using Go for DevOps applications. 5 points posted by Philip Volmar https://blog.bluematador.com/posts/golang-pros-cons-for-devops-part-1-goroutines-panics-errors/ 2284 Wed, 31 May 2017 19:52:00 +0000 Code: Golang Pros & Cons for DevOps (Part 3 of 6): Speed vs. Lack of Generics #devops 3 points posted by Philip Volmar https://blog.bluematador.com/posts/golang-pros-cons-devops-part-3-speed-lack-generics/?utm_source=gonews&utm_medium=link&utm_campaign=golang3 2394 Wed, 12 Jul 2017 18:01:00 +0000